Page 1 of 1

1) Find the errors in the following codes: int main() { int { Hanging Indent #include ; int a = 1;b = 4; c, d C + = a++;

Posted: Fri Jul 01, 2022 5:45 am
by answerhappygod
1 Find The Errors In The Following Codes Int Main Int Hanging Indent Include Int A 1 B 4 C D C A 1
1 Find The Errors In The Following Codes Int Main Int Hanging Indent Include Int A 1 B 4 C D C A 1 (83.16 KiB) Viewed 35 times
1) Find the errors in the following codes: int main() { int { Hanging Indent #include ; int a = 1;b = 4; c, d C + = a++; d = 5--; printf("Please enter an inter: "); scanf("%f", num) d = (num = 0? a+b:a+b+c); sum = (a:b:c:d: a+b+c+d); printf("Sum is %d: \n", Sum); Return 0; } 2) Assume a, b, c and n are float variables, and d, e, fand m are integer variables, what is the result of each “printf” function in the following program? Please do not run IDE to get the results.
n = 5.0; m = 5; e = 3; a = n / 2.0; b = n++; C = ++n; d = m % 2; e = m--— - f = e* m; ++d * 5; printf("a = %.3f\n", a); printf("b = %.2f\n", b); printf("c = %.1f\n", c); printf("n = %f\n", n); printf("d = %d\n", d); printf("e %d\n", e); printf("f = = %d\n", f); printf("m = %d\n", m);