what are the interview question's in the language c
Answers were Sorted based on User's Feedback
Interview questions in C would be :
- what are pointers?
- what do the .h files mean?
my fav ques - which i will always ask is :
** what is the differance between a[0] and *a.
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / mallik
a[0] represents only that value at 0 location,but *a
represents the address of that variable stored
| Is This Answer Correct ? | 0 Yes | 0 No |
main() { float f1=10.5; double db1=10.5 if(f1==db1) printf("a"); else printf("b") }
Write a program to print a (*)pattern programming (A to Z) in capital in one programming ?
is assignment operator is arithmatic or not
Explain how can I pad a string to a known length?
What is logical error?
How can I prevent another program from modifying part of a file that I am modifying?
typedef struct { int i:8; char c:9; float f:20; }st_temp; int getdata(st_temp *stptr) { stptr->i = 99; return stptr->i; } main() { st_temp local; int i; local.c = 'v'; local.i = 9; local.f = 23.65; printf(" %d %c %f",local.i,local.c,local.f); i = getdata(&local); printf("\n %d",i); getch(); } why there there is an error during compiling the above program?
Explain the concept of "dangling pointers" in C.
main() { int i=1; while (i<=5) { printf("%d",i); if (i>2) goto here; i++; } } fun() { here: printf("PP"); }
Explain how are portions of a program disabled in demo versions?
What is typedef example?
Explain what is the most efficient way to store flag values?