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 8973

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

Mascot,

7 12659

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

Mascot, TCS,

8 18440

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

Mascot,

15 17718

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

Motorola, TCS, Wipro,

9 40337

write a C code To reverse a linked list

Motorola, Wipro,

2 14009

Difference between Class and Struct.

Ericsson, Motorola, Wipro,

13 37387

Tell about strtok & strstr functions

HCL, iFlex, Motorola,

2 18319

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 7758

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

Verifone,

6 21119

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 22464

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

Wipro,

7 12108

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 15461

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

TCS,

6 13492

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 20198


Post New C Questions

Un-Answered Questions { C }

What kind of structure is a house?

641


Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?

673


Can you tell me how to check whether a linked list is circular?

900


Tell me about low level programming languages.

731


Differentiate Source Codes from Object Codes

970






One of the Institutes contains 5 student groups. Every group contains 4 students. Institute wants to store student group’s details in array. Group should contain group member’s details (name and registration number and age), project name, and mark of the group.

2262


Does c have enums?

678


Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon

1831


Can a void pointer point to a function?

658


What is external variable in c?

695


What is function pointer c?

682


What is the difference between text files and binary files?

791


What does typedef struct mean?

770


develop algorithms to add polynomials (i) in one variable

1842


Do variables need to be initialized?

706