C Interview Questions
Questions Answers Views Company eMail

To what value are pointers initialized? 1) NULL 2) Newly allocated memory 3) No action is taken by the compiler to initialize pointers.


4 5025

Which of the following sorts is quickest when sorting the following set: 1 2 3 5 4 1) Quick Sort 2) Bubble Sort 3) Merge Sort

7 9997

Which of the following data structures is on average the fastest for retrieving data: 1) Binary Tree 2) Hash Table 3) Stack

3 8382

Evaluate the following: int fn(int v) { if(v==1 || v==0) return 1; if(v%2==0) return fn(v/2)+2; else return fn(v-1)+3; } for fn(7); 1) 10 2) 11 3) 1

6 7749

What character terminates all strings composed of character arrays? 1) 0 2) . 3) END

3 4731

True or false: If you continuously increment a variable, it will become negative? 1) True 2) False 3) It depends on the variable type

7 7453

Which of the following is not a valid declaration for main ()? 1) int main() 2) int main(int argc, char *argv[]) 3) They both work

2 5862

Which is not valid in C? 1) class aClass{public:int x;} 2) /* A comment */ 3) char x=12;

7 5375

void swap(int a,int b) { a=a+b; b=a-b; a=a-b; } in this code always gives the same result for all case

TCS, Accenture,

9 9291

if a five digit number is input through the keyboard, write a program to calculate the sum of its digits. (hint:-use the modulus operator.'%')

22 44976

in iso what are the common technological language?


Write a program or provide a pseudo code to flip the 2nd bit of the 32 bit number ! (Phone Screen)

Wipro, NetApp, PTU,

1 4870

what is the diff b/w static and non static variables in C. Give some examples plz.


3 9929

Add 2 64 bit numbers on a 32 bit machine

NetApp, EMC, Hyderabad Central University,

3 14254

Write a program to accept a character & display its corrosponding ASCII value & vice versa?

9 28191

Post New C Questions

Un-Answered Questions { C }

2) Write a program that will help Air Traffic Control for an airport to view the sequence of flights ready for take-off. The airport can accommodate 10 flights waiting for take-off at any point in time. Each flight has a unique 3 digit numeric identifier.  Each time a flight takes-off, Air Traffic Control adds a flight to the waitlist. Each time a flight is added to the waitlist, the list of flights waiting to take-off must be displayed.  When a flight is cleared for take-off, Air Traffic Control removes the flight from the waitlist. Each time a flight takes-off, the list of flights waiting to take-off must be displayed.  Sequence of take-off is the sequence of addition to the waitlist


`write a program to display the recomended action depends on a color of trafic light using nested if statments


what are the facialities provided by you after the selection of the student.


write a c program for swapping two strings using pointer


write a programming in c to find the sum of all elements in an array through function.


Write a program to maintain student’s record. Record should not be available to any unauthorized user. There are three (3) categories of users. Each user has its own type. It depends upon user’s type that which kind of operations user can perform. Their types and options are mentioned below: 1. Admin (Search Record [by Reg. No or Name], View All Records, Insert New Record, Modify Existing Record) 2. Super Admin (Search Record [by Reg. No or Name], View All Records, Insert New Record, Modify Existing Record, Delete Single Record) 3. Guest (Search Record [by Reg. No or Name], View All Records) When first time program runs, it asks to create accounts. Each user type has only 1 account (which means that there can be maximum 3 accounts). In account creation, following options are required: Login Name: <6-10 alphabets long, should be unique> Password: <6-10 alphabets long, should not display characters when user type> Confirm Password: Account Type: Login Name, Password and Account Type should be stored in a separate file in encrypted form. (Encryption means that actual information should be changed and Decryption means that Encrypted information is changed back to the actual information) If any of the above mentioned requirement(s) does not meet then point out mistake and ask user to specify information again. When Program is launched with already created accounts, it will ask for user name and password to authenticate. On successful authentication, give options according to the user’s type.


write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1


how to write optimum code to divide a 50 digit number with a 25 digit number??




I need previous papers of CSC.......plz help out by posting them.......


please send me the code for multiplying sparse matrix using c


what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555


Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.


what is the difference between class and unio?


how many errors in c explain deply