Wednesday, October 17, 2018
®
SCIENCE ACADEMY SADDAR GOGERA OKARA
Weekly Test Series 2018
Name: _______________________ Test: (Computer -2nd Year)
Time: (1:30 Hrs) Total Marks: (30)
|| (CH# 10 Input / Output / Book-II) ||
Segment-1 (Short Questions)
Q-No 1: Define Questions from Following. 10×2 = 20
1. What is Input and Output? Write there functions?
2. Define printf Function with syntax?
3. Define Argument List with Example?
4. Write 1 Statement with Argument and 1 Statement Without Argument?
5. What is Format Specifier? Write the types of Format Specifier?
6. Write 2 Escape Sequence with their Purpose?
7. Define getch(); function with syntax?
8. How Inter value is printed?
9. How floating value is printed?
10. Define puts function with it syntax?
11. What is character input?
12. Define Scanf Fucntion with example and syntax?
2x5 = 10
Segment-2 (Trace the Output of the following) Segment-3 Trace out error from the followings:
3.
1. void main ()
void main () {
{ int i = 5;
printf(“Welcome \t”);
printf(“Thanks”); print f(“ %d”, i);
} }
Ans: Ans:
2.
void main () 4. Trace Errors:
{ #Include<STdio.H>
int a,b,c,d; viod main ()
a = 3; Printf(“Pakistan is Islamic country”)
b = 2; }
c = 3;
5.
d = a*b/c;
printf(“The Ans is=%d”, d); void main()
Ans: int = a
a=2*5;
print(“Result is ”, a);
[Link] Ahmed
[Link]@[Link] BS (CS) / MSc (Comp) C.S.T
UNIQUE SCIENCE ACADEMY SADDAR GOGERA OKARA