Sunday, May 27, 2012
C basic questions
C
basic interview questions and answers for freshers
(1)
void main(){
char i;
clrscr();
for(i=120;i<=128;i++){
printf("%d ",i);
}
getch();
}
Output: Infinite loop
(2)
void main(){
int i;
clrscr();
for(i=0,i++,i<=5;i++,i<=2;i=0,i<=5,i+=3){
printf("%d ",i);
}
getch();
}
Output: 2
(3)
void main(){
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment