C interview questions – page 11
2,130 questions. Tap “Show answer” to check yourself.
-
Difference between :- 1) NULL pointer and NULL macro ?
-
Write one statement equivalent to the following two statements x = sqr(a); return(x);
-
How to find the maximum rectangle in a histogram, and write C++ to implement it.
-
You need to write a simple macro CHAR(x) which takes a character x and converts it into ASCII value of x.
-
Int a[10]; a[-1] = 20;
-
Differences between malloc() and calloc()
-
What is the difference between following two?
-
Size of integer and pointer? are they always same?
-
Give a code snippet where using memcpy() will not give the desired output, but using memmove() will give the desired output.
-
What is volatile keyword? can a register variable be volatile?
-
Char a[5][15]; int b[5][15]; address of a 0x1000 and b is 0x2000, find address of a[3][4] and b[3][4]. Assume char is 8 bits and int is 32 bits
-
How can you change the const int i = 10 to 11?
- Advertisement
-
What is the output of below program?
-
Sizeof(int)is a) always 2 bytes b) depends on compiler that is being used c) always 32 bits d) can't tell
-
How would you return array from a function?
-
Implement factorial, do remeber to handle the overflow case, which is actually the key point, otherwise this problem will be too simple
-
Identify the incorrect expression
-
Find out what this function does.
-
How to convert decimal to octal and hexadecimal?
-
Is there any way we can expansion other than Macros
-
How do you pass a string to a function by its value ?
-
Write Macros for decrement, subtract, dividewith, setZero, setEqual, ncreaseby1 and loop.
-
What does the following function do?
-
Some C function to swap int pointers.
- Advertisement
-
Write your own memcopy function
-
When free (ptr) is executed, then what will happen?
-
Write a C program which measures the the speed of a context switch on a UNIX/Linux system.
-
What are static functions in C?
-
Differences b/w c++ structures & c structures.
-
Implementation details about unions.