In C language.

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

In C language.

Post by answerhappygod »

In C language.
In C Language 1
In C Language 1 (110.87 KiB) Viewed 47 times
Evaluate sequence or flow control in this program "sequence.c". #include <stdio.h> // Remember this was written by // the "new guy down the hall". // He doesn't really know what he // is doing. Don't try to fix it. int p int main(int argc, char *argv[]) { int m = 10; = 30; int q = 50; if (m> 40) p += 5; else if (q> 40) p += 10; else p += 20; q += 5; q+= 10; if (p > 50) q += 15; m += 10; printf("Final value of mis %d\n", m); printf("Final value of p is %d\n", p); printf("Final value of q is %d\n", q); return 0; } The first line printed by the following sequence.c is: Final value of m is [1] The second line printed by sequence.c is: Final value of p is [2] The third line printed by sequence.c is: Final value of q is [3]
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply