#include<stdio.h> int main() { int a = 5; switch(a) { default: a = 4; case 6: a--; case 5: a = a+1; case 1: a… Read More
Tag Archives: C-Loops & Control Structure
#include <stdio.h> int main() { int x = 3; if (x == 2); x = 0; if (x == 3) x++; else x += 2;… Read More
#include <stdio.h> int main() { int i = 3; while (i--) { int i = 100; i--; printf("%d ", i); } return 0; } (A)… Read More
How many times GeeksQuiz is printed #include<stdio.h> int main() { int i = -5; while (i <= 5) { if (i >= 0) break; else… Read More
Predict the output of the following program: #include <stdio.h> int main() { int check = 20, arr[] = {10, 20, 30}; switch (check) { case… Read More
What is the output of the following program? #include <stdio.h> int main() { char check = 'a'; switch (check) { case 'a' || 1: printf("Geeks… Read More
In the following program, X represents the Data Type of the variable check. #include <stdio.h> int main() { X check; switch (check) { // Some… Read More
Predict the output of the below program: #include <stdio.h> int main() { int i = 3; switch(i) { printf("Outside "); case 1: printf("Geeks"); break; case… Read More
What will be the output of the following C program segment? (GATE CS 2012) char inchar = 'A'; switch (inchar) { case 'A' : printf… Read More
#include <stdio.h> int main() { int i; for (i = 1; i != 10; i += 2) printf(" GeeksQuiz "); return 0; } (A) GeeksQuiz… Read More
Output of following C program? #include<stdio.h> int main() { int i = 0; for (printf("1st\n"); i < 2 && printf("2nd\n"); ++i && printf("3rd\n")) { printf("*\n");… Read More
# include <stdio.h> int main() { int i = 0; for (i=0; i<20; i++) { switch(i) { case 0: i += 5; case 1: i… Read More
Output? #include <stdio.h> int main() { int c = 5, no = 10; do { no /= c; } while(c--); printf ("%d\n", no); return… Read More
#include<stdio.h> int main() { int n; for (n = 9; n!=0; n--) printf("n = %d", n--); return 0; } What is the output? (A) 9… Read More
#include <stdio.h> int i; int main() { if (i); else printf("Ëlse"); return 0; } What is correct about the above program? (A) if block is… Read More