Question: a) Write the output when the following code segments in program 1.1 (Figure 6), program 1.2 (Figure 7) and program 3 (Figure 8) are
a) Write the output when the following code segments in program 1.1 (Figure 6), program 1.2 (Figure 7) and program 3 (Figure 8) are executed: //program 1.1. int a-1, b=2, c=3; printf("%d", (! (a>b) && (b //program 1.2 int a -5, b-10, c-11; x= a*b/--c+5; printf("%d %d ", --c, x); y3* c++ >= a; printf("%d d ", c, y); Answer: Figure 7 (5 marks) //program 1.3 int num6234; float weight = 72.658; int abc 65; // ASCII code 65 'A' printf ("6d ", num 2); printf("3d ", num 2000); printf ("4.2f ", weight 1.1); printf ("ke ", 987.65 +2.1234); printf("%c c c ", abc, abc 1, abc + 2): printf(" to X ", printf("I like my s abe +1, abc +2, abc + 3); d ", "abc", 1953 + abc); Figure 8 Answer: (5 marks)
Step by Step Solution
3.29 Rating (152 Votes )
There are 3 Steps involved in it
Program 11 Output 1 a b b c a b means 1 2 That is false b c means 2 3 that is true And operation bet... View full answer
Get step-by-step solutions from verified subject matter experts
