Test Solution Of Amcat:-
Question No:1
Identify the output of the following code.
#include<iostream>
using namespace std; int main()
{
int a=10, b= 5;
if(a & b){
cout<<"True Block"<<endl; } else {
cout<<"False Block"<<endl;
}
return 0;
}
1. False Block (Right)
2. Both a and b
3. Compile time error
4. True Block
Solution:- No Solution Given!!!!
Question No:2
Identify the output of the following code.
#include<iostream>
using namespace std; int main()
{
int a=1, b= 32;
int result = 5 >> 1 & a * b;
cout<<"Result is "<<result<<endl; return 0;
}
1. 1
2. 0 (Right)
3. 5
4. 32
Solution:- No Solution Given!!!!
Question No:-3
Identify the output of the following code.
#include<iostream>
using namespace std;
int main()
{
int z = 10 << 2 + (5 > 2) ? 5: 2;
cout<<"Answer is "<<z<<endl;
return 0;
}
1. 10
2. 0
3. 5 (Right)
4. syntax error
Solution:- No Solution Given!!!!
Question No:-4
What will be the output of this code?
#include<iostream>
using namespace std;
int main()
{
int demo = 1000;
int &ref;
ref = data;
cout<<ref<<endl;
}
1. 1000
2. 0xB11201
3. address of data
4. compile time error
(Right)
Solution:- No Solution Given!!!!
Question No:-5
Hi, Thanks for sharing. Very informative post, that I have ever read, the strategy given is really very helpful....Here I’m giving best AMCAT ONLINE TRAINING details, once go through it.
ReplyDeleteAMCAT ONLINE CLASSES