Computer class 12th

Computer Science Class 12 Chapter 10 Input And Output Test Paper

Q.1: Tick the correct Option.

1. The functions getch ( ) is defined in:

(a) conio.h✅

(b) sdtio.h

(c) iostream.h

(d) All

2. Which function is used to input string value from user:

(a) Gets✅

(b) Puts

 (c) Getch

(d) All

3. The field width specifier %8.2 will consume how many columns for output:

(a) 10

(b) 8✅

(c) 6

(d) 12

4. The escape sequence used to insert tab in C:

(a) \t✅

(b) \r

(c) \b

(d) \d

5. Void occupies how many bytes in memory:

(a)1

(b) 2

(c) 3

(d) 4✅

Q.2: Give answer to any eight short questions of the following.

1. Define input and list the input functions in C

2. What is purpose of getch ( ) function?

3. Trace the output of following code.

Void main()

{

Float f = 3.141592;

Printf(” f= %5.1 f”, f);

Printf(“\n f= %3.2f”, f);

4. Define the term “escap sequence”

5. What we mean by standard input and output?

6. Write a program that adds two floating point and shows their sum on screen.

7. Explain the printf function and give its syntax.

8. What is difference between format specifiejr and field with specifier?

9. Give the use of scanf function.

Q.3: Give answer to any two questions of the following.

 (a) Discuss different escape sequences in C.

(b) Write a program to convert the distance in kilometers into meters.

Related Articles

Back to top button
Enable Notifications OK No thanks