Skip to content

Category Archives: Program Output

Asked by Shobhit #include<stdio.h> int fun(int n, int *fg) {    int t, f;    if(n <= 1)    {      *fg = 1;       return 1;    }    t =… Read More
Predict the output of the below programs. Difficulty Level: RookieQuestion 1  c #include<stdio.h> int main() {    typedef int i;    i a = 0;       printf("%d", a);    getchar();… Read More
Predict the output of the below programs. Question 1 int main() {  int c=5;  printf("%d\n%d\n%d", c, c <<= 2, c >>= 2);  getchar(); } Output:… Read More
Predict the output of below C programs. Question 1: c #include<stdio.h> int main() {     int x = 5, p = 10;     printf("%*d", x, p);       getchar();… Read More
Predict the output of below programs Question 1 int main() {     int i = 0;     while (i <= 4)     {        printf("%d", i);        if (i >… Read More
Predict the output of below programs Question 1 int main() {     unsigned int i=65000;     while ( i++ != 0 );     printf("%d",i);     return 0; } Output:… Read More
Predict the output of below programs Question 1   c int main() {     while(1){         if(printf("%d",printf("%d")))             break;         else             continue;     }     return 0; } Output: Can’t be predictedExplanation: The condition in… Read More
Predict the output of below programs Question 1 #include‹stdio.h› int main() {     struct site     {         char name[] = "GeeksforGeeks";         int no_of_pages = 200;     };     struct… Read More
Predict the output of the below program. Question 1  c #include <stdio.h> int main() {   printf("%p", main);   getchar();   return 0; } Output: Address of function main. Explanation:… Read More
Predict the output of below programs. Question 1  c #include<stdio.h> char *getString() {     char str[] = "Will I be printed?";        return str; } int main() {… Read More
Predict the output of below programs. Question 1 #include<stdio.h> int main() {    int n;    for(n = 7; n!=0; n--)      printf("n = %d", n--);    getchar();    return… Read More
Predict the output of the below program. int main() {     int x = 5;     int * const ptr = &x;     ++(*ptr);     printf("%d", x);               getchar();… Read More
Predict the output of the below program #define square(x) x*x int main() {   int x;   x = 36/square(6);   printf("%d",x);       getchar();   return 0; } Output:… Read More
Predict the output of below program #include<stdio.h> int main() {  char *ptr = "geeksforgeeks";  printf("%c\n", *&*&*ptr);      getchar();  return 0; } Output: g Explanation: The… Read More