Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

C Interview Questions

2. What is the function of ceil(X) defined in math.h do? A)It returns the value rounded down to the next lower integer B)it returns the value rounded up to the next higher integer C)the Next Higher Value D)the next lower value

4113

3. When do you say that a digraph is acyclic A)if and only if its first search does not have back arcs B)a digraph is acyclic if and only if its first search does not have back vertices C)if and only if its first search does not have same dfnumber D)None of these

1172

4.A function 'q' that accepts a pointer to a character as argument and returns a pointer to an array of integer can be declared as: A)int (*q(char*)) [] B)int *q(char*) [] C)int(*q)(char*) [] D)None of the Above

9604

5. What kind of sorting is this: SORT (k,n) 1.[Loop on I Index] repeat thru step2 for i=1,2,........n-1 2.[For each pass,get small value] min=i; repeat for j=i+1 to N do { if K[j]

3923

6. Which of the Following is not defined in string.h? A)strspn() B)strerror() C)memchr() D)strod()

4809

7. Identify the correct argument for the function call fflush() in ANSI C: A)stdout B)stdin C)stderr D)All the above

7098

10. Study the code: void show() main() { show(); } void show (char *s) { printf("%sn",s); } What will happen if it is compiled & run on an ANSI C Compiler? A)It will compile & nothing will be printed when it is executed B)it will compile but not link C)the compiler will generate an error D)the compiler will generate a warning

7256

11. Look at the Code: #include void main() { char s1[]="abcd"; char s2[10]; char s3[]="efgh"; int i; clrscr(); i=strcmp(strcat(s3,ctrcpy(s2,s1))strcat(s3,"abcd")); printf("%d",i); } What will be the output? A)No output B) A Non Integer C)0 D) Garbage

9959

12. Look at the Code: main() { int a[]={1,2,3},i; for(i=0;i<3;i++) { printf("%d",*a); a++; } } Which Statement is/are True w.r.t the above code? I.Executes Successfully & Prints the contents of the array II.Gives the Error:Lvalue Required III.The address of the array should not be changed IV.None of the Above. A)Only I B)Only II C)II & III D)IV

5128

write the program for prime numbers?

245360

write the program for maximum of the following numbers? 122,198,290,71,143,325,98

4911

write a program for even numbers?

TCS,

22298

write a program for odd numbers?

21076

Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?

1737

Predict the output or error(s) for the following: 25. main() { printf("%p",main); }

10233

What is the purpose of type declarations?

180

What does %p mean?

112

How do I use void main?

124

The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?

154

What are the advantages of the functions?

171

What is gets() function?

179

How many bytes are occupied by near, far and huge pointers (dos)?

156

What is a structure and why it is used?

194

Can we access array using pointer in c language?

181

Are pointers really faster than arrays?

149

How can I do peek and poke in c?

170

What is merge sort in c?

145

What do you understand by normalization of pointers?

151

What is array of structure in c programming?

113

Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above

191