bitan biswas


{ City } pune
< Country > india
* Profession *
User No # 39254
Total Questions Posted # 0
Total Answers Posted # 3

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 55
Users Marked my Answers as Wrong # 36
Questions / { bitan biswas }
Questions Answers Category Views Company eMail




Answers / { bitan biswas }

Question { HCL, 34488 }

Write a C++ program without using any loop (if, for, while
etc) to print numbers from 1 to 100 and 100 to 1;


Answer

We can do that by recursive call.....

void fun(int no ){
int t;
printf("%d ",no);
if( no != 100 ){
t=no+1;
fun(t);
}
printf("%d ",no);
}

int main(){
fun(1);
return 0;
}

Is This Answer Correct ?    17 Yes 27 No

Question { TCS, 11867 }

write a “Hello World” program in “c” without using a semicolon?


Answer

int main(){
if(printf("Hello World")){}
}

Is This Answer Correct ?    35 Yes 4 No


Question { 6905 }

write a program that print itself even if the source file is
deleted?


Answer

int main(s){
s="int main(s){s=%c%s%c;printf(s,34,s,34);return 0;}";
printf(s,34,s,34);
return 0;
}

Is This Answer Correct ?    3 Yes 5 No