Skip to content

Category Archives: Program Output

Prerequisite – Overloading in Java1) What is the output of the following program?   Java public class Test {     public int getData() //getdata() 1     {         return… Read More
Prerequisite – Type Conversions in Java with Examples 1) What is the output of the following program? public class Test {     public static void main(String[]… Read More
Prerequisite: Dictionary 1) What is the output of the following program?   Python dictionary = {'GFG' : 'geeksforgeeks.org',               'google' : 'google.com',               'facebook' : 'facebook.com'               } del dictionary['google'];… Read More
Prerequisite – Inheritance in Java Predict the output of following Java Programs. Program 1 : class A {     public A(String s)      {         System.out.print("A");     } }… Read More
Predict the output of following Java Programs. Program 1 : public class RuntimePolymorphism {     public static void main(String[] args)     {         A a = new B();… Read More
Prerequisite – Overriding in Java 1) What is the output of the following program? class Derived  {     protected final void getDetails()     {         System.out.println("Derived class");     }… Read More
Predict the output of the following C++ programs. Program 1 #include <iostream> using namespace std; int main() {     char array[3] = "abc";     cout << array;    … Read More
Question 1 What will be the output? #include <iostream> using namespace std;    int main() {     int x = 0;     for (int i = 0;… Read More
Prerequisite – Lists in Python Predict the output of the following Python programs.  Program 1   Python list = [1, 2, 3, None, (1, 2, 3, 4,… Read More
Prerequisite – Strings in Python Predict the output of the following Python programs. These question set will make you conversant with String Concepts in Python… Read More
Prerequisite – Lists in Python Predict the output of the following Python programs. These question set will make you conversant with List Concepts in Python… Read More
1) What is the output of following program? public class Test {     private static float temp()     {         public static float sum = 21;         return(--(sum));     }… Read More
Prerequisites: multi-threading in java , Life cycle and states of a thread , Joining threads in java , start() method in java 1) What could… Read More
Prerequisite :- Local inner classes , anonymous inner classes 1) What is the output of the following java program? public class Outer  {     public static… Read More
Prerequisite – Java Constructors 1) What is the output of the following program? class Helper {     private int data;     private Helper()     {         data = 5;… Read More