Other C Interview Questions 

Question 
Asked @ 
Answers 

without using arithmatic operator convert an intger variable
x into x+1 

3 
Why doesn't C have nested functions? 

2 
What is the value of y in the following code?
x=7;y=0;
if(x=6)
y=7;
else
y=1;

TCS 
12 
swap two integer variables without using a third temporary
variable? 
Persistent 
5 
what are bitwise shift operators? 

4 
for example user gives input as " 20 or 20.0 or rs 20.0 or
20.00 or rs20 and so .. on " and the output should be
stored as " rs.20.00 " in a variable 

2 
Given an array of length N containing integers between 1
and N, determine if it contains any duplicates. 
SilverKey 
3 
how do u find out the number of 1's in the binary
representation of a decimal number without converting it
into binary(i mean without dividing by 2 and finding out
the remainder)? three lines of c code s there it
seems...can anyone help 

5 
what does exit() do? 
Cadence 
3 
m=++i&&++j()k++
printf("%d"i,j,k,m) 
ABC 
1 
If input is 123 then how to print 100 and 20 and 3 seperately? 

4 
what is output of the following statetment?Printf(“%x”,
1<<4); ? 

5 

For more C Interview Questions Click Here 