Interview questions
C interview questions – page 44
2,094 questions. Tap “Show answer” to check yourself.
-
Explain what a method is?
-
Can constructors & destructor be virtual ?
-
Explain about abstraction?
-
Write a C program that will convert Simple Sentence to Complex/Compound Sentence.
-
What is the function of % using in formatted string.
-
What is wrong with the following c program?char *s1 = "hello";char *s2 = "world";char *s3 = strcat(s1, s2);Please provide me explanations?
-
How to type a string without using printf function?
-
WRITE A PROGRAM IN'C' TO IMPLEMENT K-MAP SIMPLIFICATION TECHNIQUE.
-
Write A Program With Out Using ;
-
How can you overload a method?
-
How can you calculate number of nodes in a circular Linked List?
-
Constant volatile variable declaration is possible or not? if give any one example and reason.
-
What is static memory allocation and dynamic memory allocation?
-
How do you mark a method obsolete?
-
Would the following program compile? main() { int a=10,*j; void *k; j=k=&a; j++; k++; printf("n%u%u",j,k); }
-
What is the difference between the functions rand(),random(),srand() and randomize()?
-
Why does a linker error occurs for the segment:main(){extern int i;i=20;printf("%d",sizeof(i));}
-
Where are the auto variables stored? What is the use of register variables?
-
Explain about instance in object oriented programming?
-
Assign a=56;how to separate that number(ie:5,6) and multiply(ie:5*6) using bitwise operator?
-
What is use of macro arguments in c? what is major difference between normal macro definition and macro arguments.
-
What do you mean by normalisation of pointers
-
Differentiate between a linker and linkage?
-
What are bit fields? What is the use of bit fields in a structure declaration?
-
Can a variable be both const and volatile?
-
Whats is structure padding? Say a given structureStruct{int a;char c;float d;}the size of structure is 7 here.But structure padding is done what will be the size of the struct? Will it change and how? How to avoid this?is it necessary?
-
How would you qsort() function to sort an array of structures?
-
How can we read/write structures from/to data files?
-
What is the difference between far and near?
-
How can you get the number of elements in an array allocated dynamically at runtime? For example -int *p = (int *) malloc(sizeof(int) * n);int numElems = ? /* n is not available here */