Skip to content

Category Archives: Program Output

Prerequisite – Collections in Java 1) What is the output of the following program?  Java import java.util.*;   public class priorityQueue {     public static void… Read More
Recent Articles on C/C++ C++ articles C/C++ Programs Coding Practice   Output of C++ programs | Set 1 Output of C++ programs | Set 2… Read More
What will be the output of this program? #include<iostream> using namespace std; int x; // Global x    int main() {     int x = 10;… Read More
1) What is the output of the following program? public class Test implements Runnable {     public void run()     {         System.out.printf("%d",3);     }     public static void main(String[]… Read More
Predict the output of following Java programs: Question 1 : public class Base {     private int data;        public Base()     {         data = 5;     }… Read More
Question 1 How many times main() will get called?   C main() {    printf("\n main Called Again");    main(); } Answer : Infinite loop Description : There is no… Read More
Prerequisite – Garbage Collection in Java Difficulty level : Intermediate In Java, object destruction is taken care by the Garbage Collector module and the objects… Read More
Question 1 #include<stdio.h> int main() {     int i;     for (i = 0; i<5; i++)     {         int i;         i = 10;         printf("%d ", i) ;     }… Read More
Predict the output of the following programs: Program 1: def gfgFunction():     "Geeksforgeeks is cool website for boosting up technical skills"     return 1    print (gfgFunction.__doc__[17:21])… Read More
Difficulty level : Intermediate Predict the output of following Java Programs. Program 1: class Gfg {     // constructor     Gfg()     {         System.out.println("Geeksforgeeks");     }            static Gfg… Read More
Difficulty level : IntermediatePredict the output of following Java Programs.Program 1:  Java class GfG {     public static void main(String args[])     {         String s1 = new… Read More
Difficulty level : Intermediate Predict the output of the following Python Programs. Program 1: nameList = ['Harsh', 'Pratik', 'Bob', 'Dhruv']    print nameList[1][-1] Output: k… Read More
Difficulty level : Intermediate Predict the output of following Python Programs. Program 1: class Geeks:     def __init__(self, id):         self.id = id    manager = Geeks(100)… Read More
Difficulty level : IntermediatePredict the output of following Python Programs. Program 1:   Python class Acc:     def __init__(self, id):         self.id = id         id = 555   acc… Read More
Difficulty level : Intermediate Predict the output of following Java Programs. Program 1 : public class Calculator {     int num = 100;     public void calc(int… Read More