Skip to content

Category Archives: Program Output

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
Predict the output of following C Program. #include <stdio.h> #define R 4 #define C 4    void modifyMatrix(int mat[][C]) {    mat++;    mat[1][1] = 100;    mat++;… Read More
Predict the output of the following Java programs.  Question 1:  Java package main;   class Base {     public void Print()     {         System.out.println("Base");     } }  … Read More
Difficulty Level: Rookie Predict the output of following Java Programs. Program 1 // filename Main.java class Test {     protected int x, y; }    class… Read More
Predict the output of following C++ programs. Question 1 template <class S, class T> class Pair { private:     S x;     T y; /* ... */… Read More
Predict the output of following C programs.Question 1: C #include<stdio.h>   int main() {     enum channel {star, sony, zee};     enum symbol {hash, star};       int… Read More
Predict the output of following C programs. Question 1 #include<stdio.h> #define fun (x) (x)*10    int main() {     int t = fun(5);     int i;      for(i… Read More
Predict the output of following C++ programs. Question 1 #include<iostream> using namespace std;    class Test1 {     int x; public:     void show() {  } };… Read More