Please Give me Full solution In this Full Question Code segment 1 a) int x, y; 1. 2. x=10; 3. y=-2; 4. if(x) { 5. printf

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Please Give me Full solution In this Full Question Code segment 1 a) int x, y; 1. 2. x=10; 3. y=-2; 4. if(x) { 5. printf

Post by answerhappygod »

Please Give Me Full Solution In This Full Question Code Segment 1 A Int X Y 1 2 X 10 3 Y 2 4 If X 5 Printf 1
Please Give Me Full Solution In This Full Question Code Segment 1 A Int X Y 1 2 X 10 3 Y 2 4 If X 5 Printf 1 (72.94 KiB) Viewed 22 times
Please Give me Full solution In this Full Question Code segment 1 a) int x, y; 1. 2. x=10; 3. y=-2; 4. if(x) { 5. printf(“This is the first if block”); 6. } 7. if(y){ 8. printf(“This is the second if block”); 9. } 10. printf("\n%d\n", x++); 11. printf("%d\n", --y); 12. printf("%d %d\n", x, y); 1) (1) What will be the output of this given code segment? 2) Why did you get this output? Explain each line of statement of the code segment. Code segment 2 Output 1: b) * **** ***** *** 1. 2. 3. 4. 5. 6. 7. int i; for(i = 0; i <8; i++) { if(i==0 || i==7) printf("******\n"); else printf(“* *\n"); // 4 spaces are given } 幸 Will the code segment 2 produce similar output as the output 1? Explain your answer. (5)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply