Skip to content

Category Archives: Program Output

Predict the output of below C++ programs. Question 1 #include<iostream> using namespace std;   class A {   public:     A(int ii = 0) : i(ii) {}… Read More
Predict the output of following C programs. Question 1 #include<stdio.h>    #define R 10 #define C 20    int main() {    int (*p)[R][C];    printf("%d",  sizeof(*p));… Read More
Predict the output of below C++ programs. Question 1 // Assume that integers take 4 bytes. #include<iostream>    using namespace std;       class Test {… Read More
Predict the output of below C programs. Question 1 #include <stdio.h>    char* fun() {   return "awake"; } int main() {   printf("%s",fun()+ printf("I see you"));… Read More
Predict the output of below C programs. Question 1 C #include<stdio.h> int main(void) {   int a = 1;   int b = 0;   b = ++a +… Read More
Predict the output of below C programs. Question 1   C #include<stdio.h> int main() {    int a;    char *x;    x = (char *) &a;    a = 512;… Read More
Predict the output of below program. #include <stdio.h> #define TOTAL_ELEMENTS (sizeof(array) / sizeof(array[0])) int array[] = {1, 2, 3, 4, 5, 6, 7};    int… Read More
Difficulty Level: Rookie Question 1 Predict the output of below program. int main() {   char arr[] = "geeksforgeeks";   printf("%d", sizeof(arr));   getchar();   return 0; } Output:… Read More
Predict the output of below programs. Question 1 int fun(char *str1) {   char *str2 = str1;   while(*++str1);   return (str1-str2); }        int main() {   char… Read More
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   c 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 programsQuestion 1   c 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

Start Your Coding Journey Now!