Introduction to C Programming, End Term
Consider the below C program.
#include <stdio.h>int a = 10;int main(){ int a = 30; { printf("Value of a is %d", a); } printf("\nValue of a is %d", a);
return 0;}Which of the following is the correct output for the above program?
Consider the below C program. #include <stdio.h> int a = 10; int main() { int a = 30; { printf("Value of a is %d", a); } printf("\nValue of a is %d", a); return 0; } Which of the following is the correct output for the above program? Consider the below C program. #include <stdio.h> int main() { int a = 3; switch(a++) { case 1: a = a + 20; case 2: a = a - 3; case 3: a = a * 4; case 4: a = a / 2; default: a = a * a; } printf("%d", a); } What will be the output of the above C program? Consider the below C program. #include <stdio.h> void compute (int a, int b) { a = a + 5; b = b - 2; } int main() { int a = 234, b = 316; compute(a, b); printf("%d %d", a, b); return 0; } What will be the output of the above C program?