C Programming Interview Questions
General Questions II
C Program - General Questions
- what is the internal implementation/mechanism made to work volatile to get the updated value?
- storage classes in C
- can we assign pointer to a static variable?
- can we assign pointer to a register variable
- What is structure padding? How can we eliminate it?
- If structure padding is efficient why not C language made this as default behavior?
- bit operations :set a bit, clear a bit, toggle a bit
- find a loop in a linked list
- why size of data types is restricted?
- why volatile and why it cant be used to all variables
- difference b/w macro and a constant variable
- Build process of C program (preprocessing, compilation, linking etc)
- difference between Malloc and calloc
- what is memory leak and how to avoid it?
- Volatile variable usage
- const and volatile difference
- How above written library function to be take care in multi thread scenarios.
- What is the default value of static?
- Write an instruction such that integer pointing should point to first element of the array on increment?
- will there be any warning if yes when at compile time or run time?
- Explain about your latest project?
- Have u faced any page faults in driver and how u will solve that issue?
- can volatile and const be used together?
- How do you declare pointer to memory mapped area?
- Call backs and explain with example
- What is volatile variable?
- can we add two pointers
- can we subtract pointers
- can i call a function using the address of that function through a point variable?
- Write a C program to set a bit at a particular position.
- Difference between structures and union
- storage classes
- diff between static and extern
- Volatile use case? Volatile is qualifier or not?
- static use case ?
- how to delete duplicate node in single linked list.
- how variable ‘a’ get allocated memory in assembly level language?
- In printf what it the purpose of %X ?
- What is the size of integer variable on 32bit and 64bit machine?
- In a given structure having n number of structure members how do you find the sizeof structure?
- How can you find the offset of next structure member
- if out of n-number of structure members, xth structure member is given how can you find the size of structure?
- DO you know container macros? In all most all kernel drivers it is used?
- What is call by value and call by reference?
- If passing name is an call by value, then array name is passed is it also call by value?
- Volatile keyword? Usage?
- Can a volatile member can be cached?
- Over all more Q’s on program address space, stack heap segments?
- WAP to know how stack grows in upward or downward directions?
- WAP to convert ACII to Integer?
- Why ASCII number is required?
- Given Two boards and with exactly the same CPU should they require different compilers?
- The project done by you are in Linux platform if gcc is the compiler used what is the preprocessor used?
- what is the job of preprocessor?
- more deep question on preprocessor and compiler?
- Program to find little Endian and Big endian
- program to find the size of a structure with size of operator.
- Program to implement reversal of bits
- C-Code data segments