Tutorials
Courses
Go Premium
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.0K+ articles
Python
19.6K+ articles
Java
9.3K+ articles
Misc
7.8K+ articles
C++
3.7K+ articles
Python Programs
3.7K+ articles
Java-Output
54+ articles
CPP-Output
39+ articles
Python-Output
26+ articles
Program Output
37 posts
Recent Articles
Popular Articles
Output of C programs | Set 62 (Declaration & Initialization)
Last Updated: 22 November 2021
Prerequisite : Declaration Initialization in C programmingQ1. Consider the following code:C #include stdio.hvoid main(){ extern int i; i = 20; printf(...
read more
Misc
Computer Science Fundamentals
Program Output
C-Output
Output of C programs | Set 48
Last Updated: 05 September 2017
1. What is the output of following program?C #include stdio.h#define square(x) (x * x)int main(){ int x, y = 1; x = square(y + 1); printf(%d\n, x); ...
read more
Analysis of Algorithms
DSA
Program Output
C-Output
Output of C++ programs | Set 37
Last Updated: 10 February 2023
Predict the output for the following C++ code:Question 1CPP #include iostreamint main(){ if (std::cout hello) std::cout world; else std::...
read more
Misc
C++
Program Output
CPP-Output
Output of C++ programs | Set 36
Last Updated: 15 August 2017
Ques 1. What is the output of the following assuming that the size of int is 4 bytes.CPP #include iostreamusing namespace std;class abc { void f(); void g...
read more
C++
Program Output
CPP-Output
Output of Python Programs | Set 19 (Strings)
Last Updated: 06 September 2024
1) What is the output of the following program?PYTHON3str1 = '{2}, {1} and {0}'.format('a', 'b', 'c')str2 = '{0}{1}{0}'.format('abra', 'cad')print(str1, str2)a) c, b and a...
read more
Python
Python Programs
Program Output
Python-Output
Output of Python Programs | Set 18 (List and Tuples)
Last Updated: 06 September 2024
1) What is the output of the following program?PYTHONL = list('123456')L[0] = L[5] = 0L[3] = L[-2]print(L)a) [0, '2', '3', '4', '5', 0]b) ['6', '2', '3', '5', '5', '6']c) ...
read more
Python
Python Programs
Program Output
Python-Output
python-list
python-tuple
Output of Java Programs | Set 14 (Constructors)
Last Updated: 23 July 2025
Prerequisite - Java Constructors1) What is the output of the following program?Javaclass Helper{ private int data; private Helper() { data = 5; }}public...
read more
Java
Program Output
Java-Output
Output of Java programs | Set 13 (Collections)
Last Updated: 23 July 2025
Prerequisite - Collections in Java1) What is the output of the following program?Java import java.util.*;public class priorityQueue { public static void main...
read more
Java
Program Output
Java-Collections
Java-Output
Output of Java Programs | Set 12
Last Updated: 23 July 2025
1) What is the output of the following program?Java public class Test implements Runnable { public void run() { System.out.printf(%d, 3); } public static ...
read more
Java
Program Output
Java-Output
Output of Java Program | Set 11
Last Updated: 23 July 2025
Predict the output of following Java programs: Question 1 :Java public class Base{ private int data; public Base() { data = 5; } public...
read more
Java
Program Output
Java-Output
Output of Java programs | Set 10 (Garbage Collection)
Last Updated: 23 July 2025
Prerequisite - Garbage Collection in JavaDifficulty level : IntermediateIn Java, object destruction is taken care by the Garbage Collector module and the objects which do ...
read more
Java
Program Output
Java-Output
java-garbage-collection
Output of Python program | Set 5
Last Updated: 23 July 2025
Predict the output of the following programs:Program 1:Pythondef gfgFunction(): quot;Geeksforgeeks is cool website for boosting up technical skillsquot; return 1prin...
read more
Python
Python Programs
Program Output
Python-Output
Output of Python Program | Set 1
Last Updated: 23 July 2025
Predict the output of following python programs: Program 1:Pythonr = lambda q: q * 2s = lambda q: q * 3x = 2x = r(x)x = s(x)x = r(x)print (x)Output:24Explanation : In th...
read more
Python
Python Programs
Program Output
Python-Output
Output of Java Program | Set 4
Last Updated: 23 July 2025
Predict the output of the following Java Programs.1. What is the output of the following program?Java// file name: Main.java class Base { protected void foo() {} } ...
read more
Java
Program Output
Output of Java Program
Java-Output
Output of Java Program | Set 3
Last Updated: 23 July 2025
Predict the output of the following Java Programs:Example1:Java // filename: Test.javaclass Test { // Declaring and initializing integer variable int x = ...
read more
Java
Program Output
Java-Output
1
2
3
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !