Skip to content

Category Archives: Program Output

Predict the output of following C++ programs. Question 1 class Test1 {     int y; };    class Test2 {     int x;     Test1 t1; public:     operator… Read More
Predict the output of below C++ programs. Question 1 #include<iostream>    using namespace std;    class Test {     int value; public:     Test (int v =… Read More
Difficulty Level: RookiePredict the output of below C++ programs.Question 1   C #include<iostream> using namespace std;   class Test {     int value; public:     Test(int v); };… Read More
Difficulty Level: Rookie Predict the output of below C++ programs. Question 1 #include<iostream> using namespace std;    int x = 10; void fun() {     int… Read More
Predict the outputs of following C programs. Question 1 int main() {   int x = 10;   static int y = x;      if(x == y)… Read More
Predict the output of below C++ programs. Question 1 #include<iostream>    using namespace std; class P { public:    void print()    { cout <<" Inside P::";… Read More
Predict the outputs of following program. Difficulty Level: Rookie Question 1 #include <stdio.h> int main() {   int a = 10, b = 20, c =… Read More
Predict the output of following C programs. Question 1 #include<stdio.h> int fun() {   static int num = 40;   return num--; }    int main() {… Read More
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