Courses
Tutorials
Jobs
Practice
Contests
Data Structure
Java
Python
HTML
Interview Preparation
Trending Now
DSA
Web Tech
Foundational Courses
Data Science
Practice Problem
Python
Machine Learning
JavaScript
System Design
Django
DevOps Tutorial
Java
C
C++
ReactJS
NodeJS
CP Live
Aptitude
Puzzles
Projects
Java | Functions | Question 4
[sourcecode language="Java"]class intWrap { int x;} public class Main { public static void main(String[] args) { intWrap i = new intWrap(); i.x = 10; ...
Read More
Java Quiz
Functions
Java-Functions
Java | Functions | Question 3
[sourcecode language="Java"]class Test {public static void swap(Integer i, Integer j) { Integer temp = new Integer(i); i = j; j = temp; } public static ...
Read More
Java Quiz
Functions
Java-Functions
Java | Functions | Question 2
[sourcecode language="C"]public class Main { public static void main(String args[]) { String x = null; giveMeAString(x); System.out.println(x); ...
Read More
Java Quiz
Functions
Java-Functions
Java | Data Types | Question 2
Predict the output of following Java program.[sourcecode language="C"]class Test { public static void main(String[] args) { for(int i = 0; 0; i++) { ...
Read More
Java Quiz
Data Types
Java-Data Types
Java | Functions | Question 1
Output of following Java program?[sourcecode language="C"]class Main { public static void main(String args[]) { System.out.println(fun()); } int ...
Read More
Java Quiz
Functions
Java-Functions
Java | Data Types | Question 1
[sourcecode language="C"]class Main { public static void main(String args[]) { int t; System.out.println(t); } }[/sourcecode](A) 0(B...
Read More
Java Quiz
Data Types
Java-Data Types
Java | Class and Object | Question 2
Predict the output of following Java program[sourcecode language="Java"]class Test { int i;} class Main { public static void main(String args[]) { Test t = new Tes...
Read More
Class and Object
Java-Class and Object
Java Quiz
Java | Class and Object | Question 1
Predict the output of following Java program?[sourcecode language="Java"]class Test { int i;} class Main { public static void main(String args[]) { Test t; Sy...
Read More
Class and Object
Java-Class and Object
Java Quiz
C | Functions | Question 10
In C, what is the meaning of following function prototype with empty parameter list [sourcecode language="C"]void fun(){ /* .... */}[/sourcecode](A) Function can only be...
Read More
C Language
C Quiz
C-Functions
Functions
Virtual Functions and Runtime Polymorphism in C++
A virtual function is a member function that is declared in the base class using the keyword virtual and is re-defined (Overridden) in the derived class. It tells the comp...
Read More
CPP-Functions
cpp-virtual
cpp-inheritance
C++
School Programming
C++ | References | Question 6
Output of following C++ program?[sourcecode language="CPP"]#includeiostreamusing namespace std;int main(){ int x = 10; int ref = x; ref = 20; cout x = x endl ; x ...
Read More
C Language
C++ Quiz
C++-References
References
C++ | Destructors | Question 5
Can destructors be virtual in C++?(A) Yes(B) No Answer: (A) Explanation: See https://www.geeksforgeeks.org/g-fact-37/Quiz of this Question...
Read More
C++ Quiz
C++-Destructors
Destructors
C++ | Virtual Functions | Question 14
Predict the output of following C++ program[sourcecode language="C"]#includeiostreamusing namespace std;class Base{public: virtual void show() { cout In Base \n; }};cla...
Read More
C Language
C++ Quiz
C++-Virtual Functions
Virtual Functions
Is it fine to write void main() or main() in C/C++?
In C/C++ the default return type of the main function is int, i.e. main() will return an integer value by default. The return value of the main tells the status of the exe...
Read More
C Basics
CPP-Basics
CPP-Functions
cpp-main
C Language
C++
Can main() be overloaded in C++?
Predict the output of following C++ program.[sourcecode language="C" highllight="1,2-5"]#include iostreamusing namespace std;int main(int a){ cout a \n; return 0;}...
Read More
CPP-Functions
cpp-main
C Language
C++
1
...
11558
11559
11560
11561