You are on page 1of 1

Thursday, November 22, 2018

SCIENCE ACADEMY SADDAR GOGERA OKARA


Revision Test - 2nd Year

Name: _______________________ Test: (Com-Science II)


Time: (2:30 Hr) Total Marks: (50)

|| CH-#08 CH#-09 CH-10 C Programming”) ||

Q-No 1: Define Questions from Following… Q-No 2: Define Any (8) Questions from Following… 25
Chapter 08 , 09: Chapter 10: (Input - Output)

1. Define History of C language?


2. Write the necessity part to create software? 1. Whati difference
= 10; between input or output?
3. What are logical operators? Define any one. 2. What is Argument List? Write it types?
4. Define variable. Why is it use in programs? k = i % j;
3. What are format specifier?
5. What is Turbo C++?
6. List different types of operator in C. 4. List some format specifier? Define any one.
7. What is postfix & prefix? 5. What is scanf function?
8. What difference between Explicit and Implicit? 6. Define getche fuction?
9. Write the syntax of Preprocessor Directive? 7. What is Escape Sequence?
10. Write the output of the following statement. (Any two) Printf(“%d %d %d , i, i++, ++i);
8. Define printf function with their elements.
(a) (x++) + (++y) Where x,y = 5 Ans ? Ans ?
(b) (--k) – (k--) Where k = 1 Ans ? 9. Write the syntax of scanf function?
(c) (S = ++N) Where S = 2 , N = 3 Ans ? 10. How many types of format spacifier?
(d) (t = j--) Where j = 1 , t = 9 Ans ?
2: Define
Q-No the
1. Write Any
program (3)display
that Questions
valuefrom Following…
of Character
: Trace the Output:-
variable in c programming.
i. Int x = 0; iii. Printf(“1\n2\n3\n”); 2. Write a program that displays any Escape Sequence.
int y = 6; printf(“Security\b”); Q-No 3: Programming
int z = 8; Ans:
& &
x = y + z *2; & &
Ans: & &
iv. Associate the expression: &&
20 * (24 / 6) + 13
ii. int a,b; 3. Write a program that evaluates the vales with field width
a=40; v. Int num = 8; and field precision.
b=30; int x = 22;
a+=b; x = num;
printf(“a=%d” , a); --num;
Ans: Write the printf function and
get the output.

Engr.Naveed Ahmed
info.engrnaveed@gmail.com BS (CS) / MSc (Comp) C.S.T
UNIQUE SCIENCE ACADEMY SADDAR GOGERA OKARA

You might also like