You are not logged in.

#1 2015-09-15 04:07:07

husnain
User RankUser RankUser RankUser RankUser RankUser Rank
Administrator
From: Chichawatni,Pakistan
Registered: 2014-10-03
Posts: 8,129
Website

Enter Value:

C Programming Quizzes C Language Control Structures

Directions:
What is the output of given program if user enter value 99?

Question:
#include<stdio.h>
void main()
{
    int i;
    printf("Enter a number:");
    scanf("%d", &i); // 99 is given as input.
    if(i%5 == 0){
        printf("nNumber entered is divisible by 5");
        }
}

Option A):
Enter a number:99
Option B):
Run time error
Option C):
Enter a number:99 Number is divisible by 5
Option D):
complier error

Correct Answer is Option A):
Enter a number:99


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

2015-09-15 04:07:07

Advertisement
Ads By Google

Re: Enter Value:



Board footer