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

(4-MARKS questions)

61. Consider the subsequent program code :
#include
#include
void main ()
{
clrscr();
int x=10;
float y=10.1;
char z='a';
cout << "x = " << x << endl;
cout << "y = " << y << endl;
cout << "z = " << z << endl;
getch();
}
This program takes in an integer, floating point number and a character as a screen input from the user.
Options: False/True
Answer: False

62. Consider the subsequent program code:
#include
#include
void main()
{
clrscr();
int x=10;
int y=2;
int sum,difference,product,quotient;
sum=x+y;
difference=x-y;
product=x*y;
quotient=x/y;
cout << "The sum of " << x << " & " << y << " is " << sum << "." << endl;
cout << "The difference of " << x << " & " << y << " is " << difference << "." << endl;
cout << "The product of " << x << " & " << y << " is " << product << "." << endl;
cout << "The quotient of " << x << " & " << y << " is " << quotient << "." << endl;
getch();
}

This program obtains the sum, difference, product and quotient of 2 integers.
Options: True/False
Answer: True

63. Consider the subsequent program code :
#include
#include
void main()
{
clrscr();
int x,y,sum;
float average;
cout << "Enter two integers : " << endl;
cin>>x>>y;
sum=x+y;
average=sum/2;
cout << "The sum of " << x << " & " << y << " is " << sum << "." << endl;
cout << "The avg. of " << x << " & " << y << " is " << avg. << "." << endl;
getch();
}

This program obtains the sum and the quotient of 2 integers.
Options: False/True
Answer: False

64. Consider the subsequent program code :
#include
#include
void main ()
{
clrscr();
int v,u,a,t;
cout << "Enter the velocity, acceleration, time as integers : " << endl;
cin>>u>>a>>t;
v=u+a*t;
cout << "The final velocity is " << v << "." << endl;
getch();
}
This program outputs the final velocity after taking in the velocity, acceleration and the time as a screen input from the user.
Options: True/False
Answer: True

65. Consider the subsequent program code :
#include
#include
void main ()
{
clrscr();
int age;
cout << "Enter your current age : " << endl;
cin>>age;
if(age==16)
{
cout << "Your current age is " << age << " years." << endl;



( 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