filmov
tv
10th Computer Chapter 2 | Solved Exercise | Programming Exercise Chapter No 2 | @DigitalEducation101

Показать описание
______________/❤ All Students are Requested to Follow Me On Social Media!! ❤\_____________
How to install and Download Code::Blocks:
10th Computer Science All Lectures Playlist:
10th Computer Science All Exercise Playlist:
10th Computer Science All Example Code Playlist:
10th Computer Science All Programming Time:
10th Computer Science All Activities Playlist:
10th Computer Science All Programming Exercise Playlist:
Timestamp
00:00 Intro
00:54 Q1 Multiple Choice Questions
04:09 Q2 True or False
05:00 Q3 Definition
09:41 Q4 Briefly answer
18:25 Q5 Write down Output
25:37 Q6 Identity errors
31:25 Exercise 1
36:03 Exercise 2
38:11 Exercise 3
39:25 Exercise 4
40:14 Exercise 5
44:24 Exercise 6
47:30 Exercise 7
50:37 Exercise 8
54:30 Exercise 9
56:02 Exercise 10
57:11 Outro
User Interaction
Exercise
Q3. Define the following.
1. Define statement terminator.
2. Define format specifier.
3. Define escape sequence.
4. Define scanf.
5. Define modulus operator.
Q4. Briefly answer the following questions.
1. What is the difference between scanf and getch?
2. Which function of C language is used to display output on screen?
3. Why format specifier are important to be specified in I/O operations?
4. What are escape sequences? Why do we need them?
5. Which operators are used for arithmetic operations?
6. What are relational operators? Describe with an examples?
7. What are logical operators? Describe with an example.
8. What is the difference between unary and binary operator?
9. What is the difference between == operator and = operator?
10. What is meant by precedence of operators?
Q6 Identify errors in the following code segments
Q5 Write down the output of the following code segment
Programming Exercise 1
Programming Exercise 2
Write a program that takes Celsius temperature as input, converts the temperature into
Fahrenheit and shows the output. Formula for conversion of temperature form Celsius to
Fahrenheit:
F= 9/5 *C +32
Programming Exercise 3
Write a program that displays the following output using single printf statement:
* * * *
1 2 3 4
Programming Exercise 4
Write a program that displays the following output using single printf stetement:
I am a Boy
I live in Pakistan
I am a proud Pakistani
Programming Exercise 5
A clothing brand offers 15% discount on each item. A lady buys 5 shirts from this brand.
Write a program that calculates total price after discount and amount of discount availed
by the lady. Original prices of shirts are:
shirt 1 = 423
shirt 2 = 320
shirt 3 = 270
shirt 4 = 680
shirt 5 = 520
NOTE: Use 5 variables to store the prices of shirts.
Programming Exercise 6
Write a program that swaps the values of two integer variables without help of any third variable.
Programming Exercise 7
Write a program that takes a 5 digit number as input, calculates and displays the sum of first and last digit of number.
Programming Exercise 8
Write a program that takes monthly income and monthly expenses of the user like electricity bill, gas bill, food expense. Program should calculate the following:
Total monthly expenses
Total Yearly expenses
Monthly savings
Yearly savings
Average saving per month
Averages expenses per month
Programming Exercise 9
Write a program that takes a character and number of steps as input from user.
Program should then jump number of steps from that character.
Sample Output
Enter Character: a
Enter steps: 2
New character:c
Programming Exercise 9
Write a program that takes a character and number of steps as input from user.
Program should then jump number of steps from that character.
Sample Output
Enter Character: a
Enter steps: 2
New character:c
#DigitalEducation,
#DigitalEducationlatestnews,
#DigitalEducationShahbazAli,
#10thComputerChapterNo2SolvedExercise,
#ChapterNo2Exercise,
#10thComputerScienceChapter2ExerciseSolution,
#SolvedExercise,
#Chapter1Solution,
#CompleteSolvedExercise,
#class10computerscience,
#10classcomputersciencebook,
#computersciencenewbook10thclass,
#10thcomputerscience,
#computerscienceclass10book,
#computerscience10classbook,
#computerscienceclass10newbook,
#keybookofcomputersciencefor10thclassfederalboard,
#computerscience10thclassbookfederalboard,
#10thclasscomputersciencenewbook2020,
#computersciencebook10thclass,
#10thclassbookcomputerscience,
#computerscienceofclass10,
#10thclasscomputersciencekeybook,
How to install and Download Code::Blocks:
10th Computer Science All Lectures Playlist:
10th Computer Science All Exercise Playlist:
10th Computer Science All Example Code Playlist:
10th Computer Science All Programming Time:
10th Computer Science All Activities Playlist:
10th Computer Science All Programming Exercise Playlist:
Timestamp
00:00 Intro
00:54 Q1 Multiple Choice Questions
04:09 Q2 True or False
05:00 Q3 Definition
09:41 Q4 Briefly answer
18:25 Q5 Write down Output
25:37 Q6 Identity errors
31:25 Exercise 1
36:03 Exercise 2
38:11 Exercise 3
39:25 Exercise 4
40:14 Exercise 5
44:24 Exercise 6
47:30 Exercise 7
50:37 Exercise 8
54:30 Exercise 9
56:02 Exercise 10
57:11 Outro
User Interaction
Exercise
Q3. Define the following.
1. Define statement terminator.
2. Define format specifier.
3. Define escape sequence.
4. Define scanf.
5. Define modulus operator.
Q4. Briefly answer the following questions.
1. What is the difference between scanf and getch?
2. Which function of C language is used to display output on screen?
3. Why format specifier are important to be specified in I/O operations?
4. What are escape sequences? Why do we need them?
5. Which operators are used for arithmetic operations?
6. What are relational operators? Describe with an examples?
7. What are logical operators? Describe with an example.
8. What is the difference between unary and binary operator?
9. What is the difference between == operator and = operator?
10. What is meant by precedence of operators?
Q6 Identify errors in the following code segments
Q5 Write down the output of the following code segment
Programming Exercise 1
Programming Exercise 2
Write a program that takes Celsius temperature as input, converts the temperature into
Fahrenheit and shows the output. Formula for conversion of temperature form Celsius to
Fahrenheit:
F= 9/5 *C +32
Programming Exercise 3
Write a program that displays the following output using single printf statement:
* * * *
1 2 3 4
Programming Exercise 4
Write a program that displays the following output using single printf stetement:
I am a Boy
I live in Pakistan
I am a proud Pakistani
Programming Exercise 5
A clothing brand offers 15% discount on each item. A lady buys 5 shirts from this brand.
Write a program that calculates total price after discount and amount of discount availed
by the lady. Original prices of shirts are:
shirt 1 = 423
shirt 2 = 320
shirt 3 = 270
shirt 4 = 680
shirt 5 = 520
NOTE: Use 5 variables to store the prices of shirts.
Programming Exercise 6
Write a program that swaps the values of two integer variables without help of any third variable.
Programming Exercise 7
Write a program that takes a 5 digit number as input, calculates and displays the sum of first and last digit of number.
Programming Exercise 8
Write a program that takes monthly income and monthly expenses of the user like electricity bill, gas bill, food expense. Program should calculate the following:
Total monthly expenses
Total Yearly expenses
Monthly savings
Yearly savings
Average saving per month
Averages expenses per month
Programming Exercise 9
Write a program that takes a character and number of steps as input from user.
Program should then jump number of steps from that character.
Sample Output
Enter Character: a
Enter steps: 2
New character:c
Programming Exercise 9
Write a program that takes a character and number of steps as input from user.
Program should then jump number of steps from that character.
Sample Output
Enter Character: a
Enter steps: 2
New character:c
#DigitalEducation,
#DigitalEducationlatestnews,
#DigitalEducationShahbazAli,
#10thComputerChapterNo2SolvedExercise,
#ChapterNo2Exercise,
#10thComputerScienceChapter2ExerciseSolution,
#SolvedExercise,
#Chapter1Solution,
#CompleteSolvedExercise,
#class10computerscience,
#10classcomputersciencebook,
#computersciencenewbook10thclass,
#10thcomputerscience,
#computerscienceclass10book,
#computerscience10classbook,
#computerscienceclass10newbook,
#keybookofcomputersciencefor10thclassfederalboard,
#computerscience10thclassbookfederalboard,
#10thclasscomputersciencenewbook2020,
#computersciencebook10thclass,
#10thclassbookcomputerscience,
#computerscienceofclass10,
#10thclasscomputersciencekeybook,
Комментарии