Skip to content

Category Archives: Program Output

Ques1. What is the output of the following? import java.util.*;    public class Test { public static void main(String[] args)     {         int[] x = new… Read More
Ques1. What is the output of the following ? #include <stdio.h> void main() {     int a[5] = { 5, 1, 15, 20, 25 };     int… Read More
1.) What will be the output of the following code? #include <stdio.h> int main(void) {     int y, z;     int x = scanf("%d %d", &y, &z);… Read More
1. What will be the output of following? void main() {     int const* p = 5;     printf("%d", ++(*p)); } Options: A. 6 B. 5 C.… Read More
Ques1: What is the output of this program? class A {     public int i;     private int j; }    class B extends A {     void… Read More
1) What is the output of the following program?   PYTHON3 str1 = '{2}, {1} and {0}'.format('a', 'b', 'c') str2 = '{0}{1}{0}'.format('abra', 'cad') print(str1, str2) a)… Read More
1) What is the output of the following program? L = list('123456') L[0] = L[5] = 0 L[3] = L[-2] print(L) a) [0, ‘2’, ‘3’,… Read More
Prerequisite – Tuples and Dictionaryin Python Predict the output of the following Python programs.  1.What is the output of the following program?  Python numberGames = {}… Read More
1. What will be the output of following program? #include<iostream>    using namespace std; int main()  {     int x = 5;    if(x==5)   {        if(x==5) break;… Read More
Pre-requisite: Polymorphism in java 1) What is the output of the following program? class GFG {     protected void getData()     {         System.out.println("Inside GFG");     } } class… Read More
Short question based on c loops 1. What will be the output of the following code? #include <stdio.h> int main() {     int i = 0,… Read More
Ques 1. Assume that the size of an integer is 4 bytes and size of character is 1 byte. What will be the output of… Read More
Difficulty level : Easy Prerequisite : final keyword in java Predict the output of following Java Programs: What will be output of following program? class… Read More
1) What is the output of the following program? import threading    barrier = threading.Barrier(4)    class thread(threading.Thread):     def __init__(self, thread_ID, thread_name):         threading.Thread.__init__(self)         self.thread_ID =… Read More
What task does the following program perform? #include<iostream> #include<fstream> using namespace std;    int main()  {    ofstream ofile;     ofile.open ("text.txt");     ofile << "geeksforgeeks" << endl;… Read More