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
Category Archives: Program Output
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: Python3 def gfgFunction(): "Geeksforgeeks is cool website for boosting up technical skills" return 1 print… 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: Python3 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
Difficulty level : Intermediate Predict the output of following Java Programs. Program 1: class First { public First() { System.out.println("a"); } } class Second… Read More
Predict the output of following python programs: Program 1: r = lambda q: q * 2 s = lambda q: q * 3 x =… Read More
Predict the output of following Java Programs.Program 1: Java // Main.java public class Main { public static void gfg(String s) { System.out.println("String"); } public static… Read More
Predict the output below program #include<iostream> using namespace std; int main() { int x = 1 , y = 1, z = 1; cout… Read More
Predict the output of following C++ programs. Question 1 #include <iostream> #include <string.h> using namespace std; int main() { cout << sizeof("GeeksforGeeks") << endl;… Read More
Predict the output of following Java Programs: Question 1 // file name: Main.java class Base { protected void foo() {} } class Derived extends… Read More