C Interview Questions
Questions Answers Views Company eMail

Switch (i) i=1; case 1 i++; case 2 ++i; break; case 3 --i; Output of i after executing the program

Mascot,

5 8542

char S; char S[6]= " HELLO"; printf("%s ",S[6]); output of the above program ? (0, ASCII 0, I,unpredictable)

Mascot,

7 12045

Unsigned char c; for ( c=0;c!=256;c++2) printf("%d",c); No. of times the loop is executed ?

Mascot, TCS,

8 17614

int i; i=2; i++; if(i=4) { printf(i=4); } else { printf(i=3); } output of the program ?

Mascot,

15 16562

write a C code to reverse a string using a recursive function, without swapping or using an extra memory.

Motorola, TCS, Wipro,

9 39459

write a C code To reverse a linked list

Motorola, Wipro,

2 13752

Difference between Class and Struct.

Ericsson, Motorola, Wipro,

13 36428

Tell about strtok & strstr functions

HCL, iFlex, Motorola,

2 18024

two progs are given. one starts counting frm 0 to MAX and the other stars frm MAX to 0. which one executes fast.

Verifone,

5 7236

int a=2,b=3,c=4; printf("a=%d,b=%d\n",a,b,c); what is the o/p?

Verifone,

6 20255

C program code int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the call zap(6) gives the values of zap [a] 8 [b] 9 [c] 6 [d] 12 [e] 15

TCS, Wipro,

6 21719

n=7623 { temp=n/10; result=temp*10+ result; n=n/10 }

Wipro,

7 11506

int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the call zap(6) gives the values of zap [a] 8 [b] 9 [c] 6 [d] 12 [e] 15

Wipro,

10 14573

The C language terminator is a.semicolon b.colon c.period d.exclamation mark

TCS,

6 12819

What is false about the following A compound statement is a.A set of simple statments b.Demarcated on either side by curly brackets c.Can be used in place of simple statement d.A C function is not a compound statement.

CCEM, TCS,

5 19665


Post New C Questions

Un-Answered Questions { C }

What is variable declaration and definition in c?

479


Are there any problems with performing mathematical operations on different variable types?

546


How are structure passing and returning implemented?

566


Describe explain how arrays can be passed to a user defined function

584


Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?

1573






What are dangling pointers? How are dangling pointers different from memory leaks?

582


What is the difference between #include and #include 'file' ?

586


What is keyword in c?

576


What is advantage of pointer in c?

660


Explain void pointer?

570


Why is extern used in c?

587


what is the difference between class and unio?

1838


how do you programme Carrier Sense Multiple Access

1488


Do variables need to be initialized?

599


Who invented bcpl language?

671