Introduction to C Programming, End Term
Consider the below C program.
#include <stdio.h>
int main(){ int a = 10; { 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 = 10; { 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 = 2; 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 fun(int a, int b) { int temp = a; a = b; b = temp; } int main() { int a = 5, b = 3; fun(a, b); printf("%d %d", a, b); return 0; } What will be the output of the above C program?