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.

Aricent,

4 8083

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 14518

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

3 12044

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 17140

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

3 6896

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 14131

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 11905

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

7 8995

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

Accenture, TCS,

9 16042

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.'%')

23 73132

in iso what are the common technological language?

1618

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

NetApp, PTU, Wipro,

1 6208

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

Wipro,

3 13074

Add 2 64 bit numbers on a 32 bit machine

EMC, Hyderabad Central University, NetApp,

3 16408

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

9 35174


Post New C Questions

Un-Answered Questions { C }

Write a code to determine the total number of stops an elevator would take to serve N number of people.

718


what is the format specifier for printing a pointer value?

603


What are the 5 organizational structures?

555


What is structure pointer in c?

562


Is main a keyword in c?

616






write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

3492


Differentiate abs() function from fabs() function.

586


What are runtime error?

612


How will you print TATA alone from TATA POWER using string copy and concate commands in C?

911


a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode

640


What is array of structure in c?

584


By using C language input a date into it and if it is right?

563


Why is sizeof () an operator and not a function?

566


stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.

1836


What is the difference between ‘g’ and “g” in C?

2490