Dump all questions for selected technology

cpp interview questions - Page 1:

Is it possible to increment a pointer to a function? If yes where would it point to ?

What would be sizeof(main) ?

Can you give memory layout for initialized and uninitialized global variables, initialized and uninitialized static variables, local variables and dynamically allocated variables, variables with const qualifier and your code

Explain call stack winding and unwinding when a function is called

Specify different types of errors?

Can you state different phases of involved in forming an executable?

Explain difference between static library and dynamic library? .a and .so are extension of which libraries?

When you delete pointer twice, will it be compile time error or run time error? What happens when you re-delete a null pointer?

Define well formed program and ill formed program

What is a difference between undefined behaviour and unspecified behaviour and Implementation defined behaviour?

Is the size of a byte always 8 bits?

Can you allocate memory for a data member of a structure in size of bits? How?

What is a translation unit?

One definition rule governs compile time error or run time error?

Explain concept of sequence points considering a C/C++ expression.

volatile and const are type qualifiers or type modifiers?

Explain a use case scenario of volatile type qualifier.

Explain difference between char* const p;
const char* p;
char const *p;

What does volatile type qualifier suggest to compiler and what action does compiler take?

Do you have to initialize a const variable? Can you initialize a const data member inside a struct,class,union? Can you initialize a static const char or int or float, etc type data member of structure?

PREV
1
2
3
4
5
NEXT