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 5119

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 10207

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

3 8581




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 8028

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

3 4777

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 7536

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 5938

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

7 5445




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 9410

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 45925

in iso what are the common technological language?

874

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

Wipro, NetApp, PTU,

1 4906

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

Wipro,

3 10218

Add 2 64 bit numbers on a 32 bit machine

NetApp, EMC, Hyderabad Central University,

3 14316

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

9 28444


Post New C Questions






Un-Answered Questions { C }

write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.

776


Write a program that accept anumber in words

442


write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a

636


How do we make a global variable accessible across files? Explain the extern keyword?

633


 write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare.  You will then tabulate this information in another file.

963






pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)

1062


What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.

2940


writ a program to compare using strcmp VIVA and viva with its output.

655


Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?

2096


code for replace tabs with equivalent number of blanks

738


What is the difference between test design and test case design?

725


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

1892


Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.

976


Sir i need notes for structure,functions,pointers in c language can you help me please

1185


write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34

783