Beruflich Dokumente
Kultur Dokumente
Q-No 1: Define any 8 Questions from Following… (16) Q-No 3: Define any 3 Questions from Following… (25)
Definitions / Output: Programming With Construction With Decisions:
Q-No 2: Trace Output… (4) Write any one program using If-Else Statement.
int a , b; int a=4, b=2, c=5; 1. Write a program that input number from user
a=1; if(a>b) and determines whether it is Positive,
b=5; if(c==a) Negative or Zero, Using if-else-if Structure.
if(a+b < 6) a=6; 2. Write a program that input marks from user
printf(“Value is True”); else and tells the Grades of the Student or Pass /
else a=7; Fail Using if-else-if Structure.
printf(“Value is False”); printf(“%d” , a);
Write the following programs.
Ans: Ans:
1. Write a program that input a character and
displays whether it is Vowel or Not
int j,k,l; int p , q , r; 2. Write a program to display the names of
j=40; p = 10; the days of the week Using Switch Structure.
k=30; q = 3;
l = 15; if(p % q ==3) (OR)
if (j + k) < 60 && ( l < k – 20) r =0;
printf(“ %d” , L); else Explain two Statement from Followings:-
i. If-else-statement with Flowchart.
else r=1;
ii. if-else-if statement with Flowchart.
printf(“ %d” , j); printf(“%d” , r):
iii. Switch Statement with Flowchart.
Ans: Ans:
Engr.Naveed Ahmed
info.engrnaveed@gmail.com BS (CS) / MSc (Comp) D.I.T.
UNIQUE SCIENCE ACADEMY SADDAR GOGERA OKARA