C Interview Questions
Questions Answers Views Company eMail

what is the difference between getch() and getchar()?

Huawei, Infosys,

10 29938

what is the use of getch() function in C program.. difference b/w getch() and getche()??

HCL, IBM, Infosys, TCS, Wipro,

29 81215

how to implement stack work as a queue?

2 5379

write a c programs to do multiplication of two numbers with out using arithmatic operator ??????????

Infosys, TCS,

7 19137

what is the differnce between AF_INET and PF_INET?

Systems Plus, Wipro,

5 28830

1.what are local and global variables? 2.what is the scope of static variables? 3.what is the difference between static and global variables? 4.what are volatile variables? 5.what is the use of 'auto' keyword? 6.how do we make a global variable accessible across files? Explain the extern keyword? 7.what is a function prototype? 8.what does keyword 'extern' mean in a function declaration?

1469

9.how do you write a function that takes a variable number of arguments? What is the prototype of printf () function? 10.How do you access command-line arguments? 11.what does ‘#include’ mean? 12.what is the difference between #include<> and #include”…”? 13.what are # pragma staments? 14.what is the most appropriate way to write a multi-statement macro?

1 2926

15.what is the disadvantage of using macros? 16.what is the self-referential structure? 17.can a union be self-referenced? 18.What is a pointer? 19.What is the Lvalue and Rvalue? 20.what is the difference between these initializations? 21.Char a[]=”string”; 22.Char *p=”literal”; 23.Does *p++ increment p, or what it points to?

1 3744

24.what is a void pointer? 25.why arithmetic operation can’t be performed on a void pointer? 26.differentiate between const char *a; char *const a; and char const *a; 27.compare array with pointer? 28.what is a NULL pointer? 29.what does ‘segmentation violation’ mean? 30.what does ‘Bus Error’ mean? 31.Define function pointers? 32.How do you initialize function pointers? Give an example? 33.where can function pointers be used?

1420

34.what are bitwise shift operators? 35.what are bit fields? What is the use of bit fields in a structure declaration? 36.what is the size of an integer variable? 37.what are the files which are automatically opened when a c file is executed? 38.what is the little endian and big endian? 39.what is the use of fflush() function? 40.what is the difference between exit() and _exit() functions? 41.where does malloc() function get the memory? 42.what is the difference between malloc() and calloc() function? 43.what is the difference between postfix and prefix unary increment operators?

1463

44.what is the difference between strcpy() and memcpy() function? 45.what is output of the following statetment? 46.Printf(“%x”, -1<<4); ? 47.will the program compile? int i; scanf(“%d”,i); printf(“%d”,i); 48.write a string copy function routine? 49.swap two integer variables without using a third temporary variable? 50.how do you redirect stdout value from a program to a file? 51.write a program that finds the factorial of a number using recursion?

3 5636

52.write a “Hello World” program in “c” without using a semicolon? 53.Give a method to count the number of ones in a 32 bit number? 54.write a program that print itself even if the source file is deleted? 55.Given an unsigned integer, find if the number is power of 2?

9 9194

1.what are local and global variables? 2.what is the scope of static variables? 3.what is the difference between static and global variables? 4.what are volatile variables? 5.what is the use of 'auto' keyword? 6.how do we make a global variable accessible across files? Explain the extern keyword? 7.what is a function prototype? 8.what does keyword 'extern' mean in a function declaration?

nvidia,

2 6289

9.how do you write a function that takes a variable number of arguments? What is the prototype of printf () function? 10.How do you access command-line arguments? 11.what does ‘#include’ mean? 12.what is the difference between #include<> and #include”…”? 13.what are # pragma staments? 14.what is the most appropriate way to write a multi-statement macro?

L&T,

4 8134

15.what is the disadvantage of using macros? 16.what is the self-referential structure? 17.can a union be self-referenced? 18.What is a pointer? 19.What is the Lvalue and Rvalue? 20.what is the difference between these initializations? 21.Char a[]=”string”; 22.Char *p=”literal”; 23.Does *p++ increment p, or what it points to?

CTS,

2 10448


Post New C Questions

Un-Answered Questions { C }

When can a far pointer be used?

580


Is it better to use a macro or a function?

642


What is difference between function overloading and operator overloading?

647


Why is c platform dependent?

609


What is a memory leak? How to avoid it?

557






What is the function of volatile in c language?

654


"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above

601


What is structure in c language?

608


How can I do graphics in c?

586


What is meant by realloc()?

662


i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical

1829


Explain what are bus errors, memory faults, and core dumps?

780


How can you invoke another program from within a C program?

609


What is the heap in c?

632


Explain what is the difference between a free-standing and a hosted environment?

624