You are not logged in.

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

husnain
User RankUser RankUser RankUser RankUser RankUser Rank
Administrator
From: Chichawatni,Pakistan
Registered: 2014-10-03
Posts: 8,129
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


You cannot discover the new oceans unless you have the courage to lose the sight of the shore.

2015-09-15 04:19:30

Advertisement
Ads By Google

Re: Complier Error:



\n

Board footer