Skip to content

Category Archives: Program Output

Given a number N, the task is to print Fibonacci Series till Nth number without using any loop.Examples:   Input: N = 5 Output: 0 1 1… Read More
When we talk of randomness in general, it’s not something that shouldn’t possess repetition, it is something that outputs data that is unpredictable.  Random numbers… Read More
An Arrow operator in C/C++ allows to access elements in Structures and Unions. It is used with a pointer variable pointing to a structure or… Read More
Prerequisite: Switch Case in C/C++Problem Statement: Write a menu-driven program using the Switch case to convert the CGS system to MKS system and vice versa.Approach: MKS(Meter-Kilogram-Second) System:… Read More
Prerequisite: Dictionary Note: Output of all these programs is tested on Python3 1.What is the output of the following of code? a = {i: i… Read More
Predict the output of the following C++ programs:  Question 1:   CPP #include <cstdlib> #include <iostream> using namespace std; int main() {     int ran = rand();… Read More
Delete is an operator that is used to destroy array and non-array(pointer) objects which are created by new expression.  Delete can be used by either… Read More
What is the output of the following program?   CPP #include <iostream> using std::cout; int main() {     int i = 0;     cout << (i = 0… Read More
Consider the following C program. #include <stdio.h> int main(void) {     int a = 'd';        printf("%d\n", a);     /*OUTPUT - 100 (ASCII Code for character d)*/… Read More
Prerequisite : Decision making in CQuestion 1   C #include"stdio.h" #include"stdlib.h" void reverse(int i) {     if (i > 5)          exit(0);      printf("%d\n", i);      return reverse(i++); } int… Read More
Prerequisite : Pointers in C Question 1 : What will be the output of following program? #include "stdio.h" int main() {     char a[] = {… Read More
Prerequisite: Python-Sets 1. What is the output of the code shown below? sets = {1, 2, 3, 4, 4} print(sets) Options: {1, 2, 3} {1,… Read More
Prerequisite : String Comparison in Java 1. What should be the output of this program? class GeeksforGeeks {     public static void main(String args[])     {         String… Read More
Prerequisite : Basics of Strings class in java 1. What is the Output Of the following Program class demo1 {     public static void main(String args[])… Read More
Prerequisite: Loops and String Note: Output of all these programs is tested on Python3 1. What is the output of the following? my_string = "geeksforgeeks"… Read More

Start Your Coding Journey Now!