Skip to content

Category Archives: Program Output

Predict the output of the following Java Programs: Example1: Java // filename: Test.java   class Test {       // Declaring and initializing integer variable     int… Read More
Predict the output of following C++ programs. Question 1 #include <iostream> using namespace std;    template <int N> class A {    int arr[N]; public:    virtual… Read More
Predict the output of following C++ programs. Question 1 #include <iostream> using namespace std;    class A {     public:     A& operator=(const A&a)     {         cout <<… Read More
Predict the output of following C++ programs. Question 1 #include<iostream> using namespace std;    class Base  { public:     int fun()      { cout << "Base::fun() called";… Read More
Predict the output of following C++ programs. Question 1 #include <iostream> using namespace std;    class A { public:     void print() { cout << "A::print()";… Read More
Predict the output of following C++ program. Difficulty Level: Rookie Question 1 #include <iostream> using namespace std;    class A {     int id; public:     A… Read More
Predict the output of following C++ program. #include<iostream> using namespace std;    class A {     // data members of A public:     A ()           { cout… Read More
Predict the output of following C program. Question 1 #include <stdio.h>    int main() {     char a = 30;     char b = 40;     char c… Read More
Predict the output of following C programs. Question 1 #include <stdio.h>    int main(void) {     int i;     int power_of_ten[5] = {                             00001,                             00010,                             00100,                             01000,… Read More
Predict the output of following C++ programs. Question 1 #include <iostream> using namespace std;    int fun(int a, int b  = 1, int c =2)… Read More
Predict the output of following C++ programs. Question 1 #include<iostream> using namespace std;    class Point { private:     int x;     int y; public:     Point(const Point&p)… Read More
Predict the output of following C++ programs.Question 1  C #include<iostream> #include<string.h> using namespace std;   class String {     char *p;     int len; public:     String(const char… Read More
Predict the output of following C programs. Question 1 #include <stdio.h>     int main() {   int arr[] = {};   printf("%d", sizeof(arr));   return 0; } Output:… Read More
Predict the output of following C program. int main(void) {     struct str     {         int i: 1;         int j: 2;         int k: 3;         int l: 4;… Read More
Predict the output of following C programs:Difficulty Level: Rookie Question 1   C #include<stdio.h> int main() {     int arr[] = {10, 20, 30, 40, 50, 60};     int… Read More

Start Your Coding Journey Now!