You are not logged in.

#1 2015-09-15 04:16:35

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

C Language Control Structures Quiz Question.

C Programming Quizzes C Language Control Structures

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

Question:
#include<stdio.h>
void main()
{
    int value1, value2=100, num=100;
    if(value1=value2%5) num=5;
    printf("%d %d %d", num, value1, value2);
}

Option A):
100 100 100
Option B):
5 0 20
Option C):
100 0 100
Option D):
100 5 100

Correct Answer is Option C):
100 0 100


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

2015-09-15 04:16:35

Advertisement
Ads By Google

Re: C Language Control Structures Quiz Question.



\n

Board footer