How To Exam?

a knowledge trading engine...


Sikkim-Manipal University of Health Medical and Technological Sciences (SMUHMTS) 2008-2nd Sem M.C.A Model for of Manipal University. - Question Paper

Monday, 10 June 2013 11:45Web
cout << "You are of the right age for joining grade 10 !" << endl;
}
else
{
cout << "Your current age is” << age << " years." << endl;
cout << "You are not of the right age for joining grade 10 !" << endl;
}
getch();
}

This program tells you whether you should be in grade 10 or not.
Options: True/False
Answer: True

66. Consider the subsequent program code:
#include
#include
void main ()
{
clrscr();
int x;
cout << "Enter an integer : " << endl;
cin>>x;
if(x>100)
{
cout << x << " is greater than 100." << endl;
}
else
{
cout << x << “is less than 100." << endl;
}
getch();
}
This program tells you whether an integer is less or greater than 100.
Options: True/False
Answer: True

67. Consider the subsequent program code:
#include
#include
void main()
{
clrscr();
long int svalue;
float commission;
cout << "Enter the total sale value : " << endl;
cin>>svalue;
if(svalue<=10000)
{
commission=svalue*5/100;
cout << "For a total sale value of $" << svalue << ", ";
cout << "the agent's commission is $" << commission;
}
else if(svalue<=25000)
{
commission=svalue*10/100;
cout << "For a total sale value of $" << svalue << ", ";
cout << "the agent's commission is $" << commission;
}
else if(svalue>25000)
{
commission=svalue*20/100;
cout << "For a total sale value of $" << svalue << ", ";
cout << "the agent's commission is $" << commission;
}
getch();
}
This program enables the user to enter the sale value and obtain the agent's commission for that sale.
Options: True/False
Answer: True

68. Consider the subsequent program code:
#include
#include
int main()
{
clrscr();
int choice;
cout << "1. Talk" << endl;
cout << "2. Eat" << endl;
cout << "3. Play" << endl;
cout << "4. Sleep" << endl;
cout << "Enter your option : " << endl;
cin>>choice;
switch(choice)
{
case one : cout << "You chose to talk...talking too much is a bad habit." << endl;
break;
case two : cout << "You chose to eat...eating healthy foodstuff is good." << endl;
break;
case three : cout << "You chose to play...playing too much everyday is bad." << endl;
break;
case four : cout << "You chose to sleep...sleeping enough is a good habit." << endl;
break;
default : cout << "You did not select anything...so exit this program." << endl;
}
getch();
}
This program is enabled to switch ranging from various cases.
Options: True/False
Answer: True

69. Consider the subsequent program code :
#include
#include
void main()
{
clrscr();
int x;
float sinterest,principal,rate,time;
for(x=4;x>=0;x--)
{
cout << "Enter the principal, rate & time : " << endl;
cin>>principal>>rate>>time;
sinterest=(principal*rate*time)/100;
cout << "Principal = $" << principal << endl;
cout << "Rate = " << rate << "%" << endl;
cout << "Time = " << time << " years" << endl;
cout << "Simple Interest = $" << sinterest << endl;
}
getch();
}
This program is executed four times using the 'FOR' loop.
Options: False/True
Answer: False

70. Consider the subsequent program code:

#include
#include
void main ()
{
clrscr();
int x;
cout << "Enter an integer : " << endl;
cin>>x;
if(x>100)
{
cout << x << " is greater than 100." << endl;
}
else
{
cout << x << " is less than 100." << endl;
}
getch();
}
This program tells you whether an integer is less or greater than 100.
Options: True/False
Answer: True
71. Output of the subsequent program will be:

void main()
{
int x=5,y=5;
cout<cout<<” “;
cout<< --x;
cout<<” “;
cout<}

a. five six 5,6
b. six five 5 5
c. five 5 4,4
d. five 5 five 4

72. The output of the code will be :

for(i=1;i<=5;i++)
{
if(i==3)
continue;
cout<}

a. 1,2,3,4,5
b. 1,2,3
c. 1,2,4,5
d. none of the above

73. The output of code will be
int i=4,j=-1,k=0,w,x,y,z;
w=i||j||k;
x=i&&j&&k;
y=i||j&&k;
z=i&&j||k;
cout<
a. 1,1,1,1
b. 4,0,1,1
c. 1,0,1,1
d. none of the above

74. The output of the subsequent program is:
int a=10;
void main()
{
void demo(int &,int, int*);
int a=20,b=5;
demo(::a,a,&b);
cout<<::a<}
void demo(int &x, int y, int *z)
{
a+=x;
y*=a;
*z=a+y;
cout<}
a) 20 400 420
20 20 420
b) 10 200 420
20 20 420
c) 10 20 35
20 20 400
d) none of the above

75. provide the output of the subsequent program code:
struct point
{
int x,y;
};
void show(point p)
{
cout<void main()
{
point U={20,10},V,W;
V=U;
V.x+=20;
W=V;
U.y+=10;
U.x+=5;
W.x+=5;
Show(U);
Show(V);
Show(W);
}
a) 25:20
40:10
45:10
b) 20:30
40:20
30:10
c) 25:30
40:10
45:10
d) 30:20
30:10
45:10







( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Sikkim-Manipal University of Health Medical and Technological Sciences (SMUHMTS) 2008-2nd Sem M.C.A Model for of Manipal University. - Question Paper