You are not logged in.

#1 2015-09-15 04:19:32

hasnain
Administrator
From: Chichawatni
Registered: 2014-10-13
Posts: 8,355
Website

Complier Error:

C Programming Quizzes C Language Control Structures

Directions:
What will be the output of the given program?

Question:
#include<stdio.h>
void main()
{
    float num=5.6;
    switch(num){
        case 5:printf("5");
        case 6:printf("6");
        default : printf("0");
            break;

    }
    printf("%d", num);
}

Option A):
0 5.600000
Option B):
5 5.600000
Option C):
Complier error
Option D):
6 5.600000

Correct Answer is Option C):
Complier error


Failure is the first step towards seccess.

2015-09-15 04:19:32

Advertisement
Ads By Google

Re: Complier Error:



\n

Board footer