Skip to content

Category Archives: Program Output

Prerequisite – Loops in Python Predict the output of the following Python programs. 1) What is the output of the following program? x = ['ab',… Read More
You came across how to generate random numbers and use of two C function rand() and srand() from the article rand() and srand() in C\C++.Listed… Read More
Predict the output of the following C programs.1. What will be the output of following program? Input:  1 3 C #include<stdio.h> int main() {     int a,… Read More
Prerequisite: Strings Question What is the Output? #include <iostream> #include <cstring> using namespace std;    int main() {     char s1[] = "geeksforgeeksforgeeks";     char s2 =… Read More
Prerequisite: Access modifiers in c, Inheritance 1. What is the output?  C++ #include <iostream> using namespace std;   class access {     int a = 10;… Read More
Prerequisite: Regular Expressions Note: Output of all these programs is tested on Python3 1) Which of the options below could possibly be the output of… Read More
Prerequisite: Dictionary Note: Output of all these programs is tested on Python31) What is the output of the following program?   PYTHON3 D = dict() for x… Read More
Prerequisite: Constructors and Destructors 1) What is the output of the following program? #include <iostream> using namespace std; class Sand {     public: Sand()         {             cout… Read More
Prerequisite: Lists and Tuples 1) What is the output of the following program?   PYTHON List = [True, 50, 10] List.insert(2, 5)    print(List, "Sum is: ",… Read More
Prerequisite – Constructors in C++   1. What is the output of following program?   CPP #include <iostream> using namespace std;   class construct {     int a,… Read More
Prerequisite: List and Tuples Note: Output of all these programs is tested on Python3 1) What is the output of the following program?  PYTHON L1 =… Read More
Pre-requisite: List in python 1) What is the output of the following program? data = [2, 3, 9] temp = [[x for x in[data]] for… Read More
Pre-requisite: Exception Handling in Python Note: All the programs run on python version 3 and above. 1) What is the output of the following program?… Read More
Prerequisite: Inheritance in Java  1) What is the output of the following program?  Java public class A extends B {     public static String sing()     {… Read More
Prerequisite: Pointers in C/C++ Question 1 What will be the output? #include<stdio.h>    int main() {      int a[] = { 1, 2, 3, 4, 5}… Read More