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 4

Is the following statement a declaration or definition
extern int i;

Declaration
 Definition
SHOW ANSWER


main()
{
     int x = 10;
    {
        int x = 0;
        printf("%d",x);
    }
}

10
Compilation Error
0
Undefined
SHOW ANSWER


int x = 10;
int main()
{
    int x = 0;
    printf("%d",x);
    return 0;
}

10
 0
Compilation Error
Undefined
SHOW ANSWER

Which programming language is more faster among these?

Java
PHP
C
Visual Basic
SHOW ANSWER

Choose a C Conditional Operator from the list.

?:
:?
 :<
<:
SHOW ANSWER

Choose a statement to use C If Else statement.

else if is compulsory to use with if statement.
else is compulsory to use with if statement.
 else or else if is optional with if statement.
None of the above
SHOW ANSWER

Choose a correct C Statement using IF Conditional Statement.

 
if( condition )
{
    //statements;
}
 
if( condition )
{
    //statements;
}
else
{
    //statements;
}

if( condition1 )
{
    //statements;
}
else if( condition2)
{
    //statements;
}
else
{
    //statements;
}

 All the above.

SHOW ANSWER

What is the output of the C Program.?
int main()
{
    if( 4 > 5 )
    {
        printf("Hurray..\n");
    }
     printf("Yes");

    return 0;
}

Yes
Hurray..

Yes
 Hurray..Yes
Compiler error
SHOW ANSWER

What is the output of the C Program.?
int main()
{
    if( 10 < 9 )
        printf("Hurray..\n");
    else if(4 > 2)
        printf("England");

    return 0;
}

England
Hurray..
 Compiler error for missing else
None of the above
SHOW ANSWER

What is the output of C Program.?
int main()
{
    if( 10 > 9 )
        printf("Singapore\n");
    else if(4%2 == 0)
        printf("England\n");
        printf("Poland");
    return 0;
}

Singapore
Singapore

Poland
Singapore

England

Poland
England

Poland
SHOW ANSWER

What is the output of the C Program.?
int main()
{
    if(-5)
    {
        printf("Germany\n");
    }
    if(5)
    {
        printf("Texas\n");
    }
    printf("ZING");

    return 0;
}

ZING
Texas

ZING
Germany

Texas

ZING
Compiler error as a number can not be put as condition inside IF.
SHOW ANSWER

What is the output of the C Program.?
int main()
{
    if(10.0)
    {
        printf("Texas\n");
    }
    printf("ZING");

    return 0;
}

ZING
Texas

ZING
 Compiler error.
 None of the above.
SHOW ANSWER

What is the output of C Program.?
int main()
{
    if("abc")
    {
        printf("India\n");
    }
    if('c')
    {
        printf("Honey\n");
    }
    printf("ZING");

    return 0;
}

ZING
Honey

ZING
India

ZING
 India

Honey

ZING
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