Call
whatsapp
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
Cisco Training in Trivandrum, Trinity Technologies

No.1 Training Institute in Kerala

C PROGRAM QUESTIONS : PART 6

How many logical operators are combined to form a compound condition?

1
2
3
4
SHOW ANSWER

Sequence of statements that is treated as a single statement, is called

Conditional statement
Compound statement
Arithmetic statement
All of them
SHOW ANSWER

Which from following is a relational operator?

+
-
<
รท
SHOW ANSWER

Conditional statements can be used within another conditional statements that are called

Nesting Conditional statements
Compound statements
Switch Statements
None of them 
SHOW ANSWER

Actual values defined in enumeratorlist is called

Operators
Variables
Enumerators
Enum
SHOW ANSWER

Logical symbol ! This is used for

AND operator
OR operator
.NOT operator
None of them
SHOW ANSWER

Symbol >> is known as

Insertion operator
Extraction operator
Output operator
None of them
SHOW ANSWER

Extraction operator is also known as

Output operator
Conditional operator
Input operator
None of them
SHOW ANSWER

This statement {int temp = x; x = y; y = temp ;} is an example of

Conditional statement
Compound statement
Arithmetic statement
None of them
SHOW ANSWER

What is the output of below program?
int main()
{
 if(0)
 {
    cout<<"Hi";
 }
 else
 {
    cout<<"Bye";
 }
return 0;
}

 Hi
Bye
HiBye
Compilation Error
SHOW ANSWER

What should be the output of below program?
void main()
{
    int a = 1;
    switch(a)
    {
        case 1: cout<<"One";
        case 2: cout<<"Two";
        case 3: cout<<"Three";
        default: cout<<"Default";
    }

}

One
 Compilation Error
Default
OneTwoThree
SHOW ANSWER

What should be output of below program if use enter a = 5?
int main()
{
    int a;
    cin>>a;  // user can enter any value
    
    if (++a*5 <= 25)
    {
        cout<<"Hello";
    }
    else
    {
        cout<<"Bye";    
    }
}

Hello
Bye
 Undefined
Compilation Error
SHOW ANSWER


39.What should be printed on screen?
int main() 
{
int x = 5;

if(x++ == 5)
cout<<"Five"<<endl;
else
if(++x == 6)
cout<<"Six"<<endl;

return 0;
}

FiveSix
Five
Six
 None of these
SHOW ANSWER
BACK | NEXT
TRINITY SOFTWARE SOLUTIONS,IInd floor, Radheyam Towers, Gandhari Amman Kovil Road, Pulimood, Trivandrum - 1
0471-2334855 | 2335855 | 9447387064 | 9847003556 info@trinitytechnology.in