Skip to content
Gblog Must Do Coding Questions for Product Based Companies
As the placement season is back, Geeksforgeeks is here to help you crack the interview. We have selected some most commonly asked and MUST DO… Read More
February 15, 2021
The process of removing function entries from function call stack at run time is called Stack Unwinding. Stack Unwinding is generally related to Exception Handling.… Read More
C++
Exception Handling – catching base and derived classes as exceptions: If both base and derived classes are caught as exceptions then catch block of derived… Read More
C++
In C/C++, precedence of Prefix ++ (or Prefix –) has higher priority than dereference (*) operator, and precedence of Postfix ++ (or Postfix –) is… Read More
What will be the output of the following C program? #include <stdio.h> int main() {    int a = 3, b = -8, c = 2;… Read More
In C/C++, when a character array is initialized with a double quoted string and array size is not specified, compiler automatically allocates one extra space… Read More
Predict the output of following C++ program. #include <iostream> using namespace std;    int main() {    int test = 0;    cout << "First  character "… Read More
Atomic Operation What is an atomic operation? An idea of atomic operation helps in understanding reentrancy, critical section, thread safety, synchronization primitives, etc… (we will… Read More
In C, a structure cannot have static members, but in C++ a structure can have static members. For example, following program causes compilation error in… Read More
Recursion:In programming terms a recursive function can be defined as a routine that calls itself directly or indirectly.Using recursive algorithm, certain problems can be solved… Read More
Assigning values to static final variables in Java: In Java, non-static final variables can be assigned a value either in constructor or with the declaration.… Read More
A class declaration can contain static object of self type, it can also have pointer to self type, but it cannot have a non-static object… Read More
C++
Modulus operator is costly. The modulus operator (%) in various languages is costly operation. Ultimately every operator/operation must result in processor instructions. Some processors won’t… Read More
Every literal (constant) in C/C++ will have a type information associated with it. In both C and C++, numeric literals (e.g. 10) will have int… Read More
C++
In C, if an object that has static storage duration is not initialized explicitly, then: — if it has pointer type, it is initialized to… Read More
const Behaviour in C and C++ In C, the const qualified identifiers will have external linkage, where as in C++ it will have internal linkage.… Read More