Bank exam questions and answers

Group exam questions and answers

Technical questions and answers

1.
What will be output of the following program?

#include
int main(){
float a=0.7;d
if(a<0.7){
printf("C");
}
else{
printf("C++");
}
return 0;
}
Output: Turbo C++ 3.0: c Turbo C ++4.5: c Linux GCC: c Visual C++: c
2. What will be output of the following program?

#include
int main(){
int i=1;
i=2+2*i++;
printf("%d",i);
return 0;
}
Output: Turbo C++ 3.0: 5 Turbo C ++4.5: 5 Linux GCC: 5 Visual C++: 5
3. What will be output of the following program?

#include
int main(){
int a=0,b=10;
if(a=0){
printf("true");
}
else{
printf("false");
}
return 0;
}
Turbo C++ 3.0: false Turbo C ++4.5: false Linux GCC: false Visual C++: false
4. What will be output of the following program?

#include
int main(){
int a;
a=015 + 0x71 +5;
printf("%d",a);
return 0;
}
Turbo C++ 3.0: 131 Turbo C ++4.5: 131 Linux GCC: 131 Visual C++: 131
5. What will be output of the following program?

#include
int main(){
int a=2;
a=a++ + ~++a;
printf("%d",a);
return 0;
}
Turbo C++ 3.0: -1 Turbo C ++4.5: 0 Linux GCC: 0 Visual C++: 0
div itemprop="description">AptTree.com is enhanced solution for learning and training all categories of Group&bank Questions and Answers.
Date published: 01/01/2015
5 / 5 stars