Skip to content
Gblog FREE GATE CS 2022 Mock Test – All India Mock By GeeksforGeeks
Graduate Aptitude Test in Engineering (GATE) Exam is one of the most renowned and prestigious exams in India that is conducted jointly by seven IITs… Read More
Please find the details of my amazon interviews below. Date of Interviews: 22nd August 2012 No of Rounds: 1 Written + 4 PI Type of Interviews: Campus… Read More
Given a singly linked list, rotate the linked list counter-clockwise by k nodes. Where k is a given positive integer. For example, if the given… Read More
Predict the output of following C programs. Question 1 #include <stdio.h>    int main(void) {     int i;     int power_of_ten[5] = {                             00001,                             00010,                             00100,                             01000,… Read More
Given a sequence of words, and a limit on the number of characters that can be put in one line (line width). Put line breaks… Read More
Prerequisite: Bool Data Type in C++The C99 standard for C language supports bool variables. Unlike C++, where no header file is needed to use bool,… Read More
Static data members are class members that are declared using static keywords. A static member has certain special characteristics. These are: Only one copy of… Read More
Predict the output of following C++ programs. Question 1 #include <iostream> using namespace std;    int fun(int a, int b  = 1, int c =2)… Read More
Let’s first understand what Default arguments and Virtual functions mean. Default Arguments: These are the values provided during function declaration, such that values can be… Read More
What will be the size of following structure?  CPP struct employee {     int     emp_id;     int     name_len;     char    name[0]; }; 4 + 4 + 0 =… Read More
C++ supports following 4 types of casting operators: 1. const_cast 2. static_cast 3. dynamic_cast 4. reinterpret_cast 1. const_cast const_cast is used to cast away the… Read More
To understand ‘this’ pointer, it is important to know how objects look at functions and data members of a class. Each object gets its own… Read More
Predict the output of following C++ programs. Question 1 #include<iostream> using namespace std;    class Point { private:     int x;     int y; public:     Point(const Point&p)… Read More
Given a function foo() that returns integers from 1 to 5 with equal probability, write a function that returns integers from 1 to 7 with… Read More
Given Preorder traversal of a BST, check if each non-leaf node has only one child. Assume that the BST contains unique entries. Examples   Input: pre[]… Read More
Given three linked lists, say a, b and c, find one node from each list such that the sum of the values of the nodes… Read More

Start Your Coding Journey Now!