Exercice in C PROGRAMMING / PDF
Exercice in C PROGRAMMING / PDF
Sample of the pdf document
1) Which of the following statements is true?
a) C Library functions provide I/O facilities
b) C inherent I/O facilities
c) C doesn’t have I/O facilities
d) Both (a) and (c)
2) Header files in C contain
a) Compiler commands
b) Library functions
c) Header information of C programs
d) Operators for files
3) Which pair of functions below are used for single character I/O.
a) Getchar() and putchar()
b) Scanf() and printf()
c) Input() and output()
d) None of these
4) The printf() function retunes which value when an error occurs?
a) Positive value
b) Zero
c) Negative value
d) None of these
5) Identify the wrong statement
a) putchar(65)
b) putchar('x')
c) putchar("x")
d) putchar('\n')
6) The output of printf("%u", -1) is
a) -1
b) minimum int value
c) maxium int value
d)
9) Null character is represented by
a) \n
b) \0
c) \o
d) \e
10) Which header file is essential for using strcmp() function?
a) string.h
b) strings.h
c) text.h
d) strcmp.h
11) malloc() function used in dynamic allocation is available in which header file?
a) stdio.h
b) stdlib.h
c) conio.h
d) mem.h
12) File manipulation functions in C are available in which header file?
a) streams.h
b) stdio.h
c) stdlib.h
d) files.h
13) C supports how many basic looping constructs
a) 2
b) 3
c) 4
16) Which among the following is a unconditional control structure
a) do-while
b) if-else
c) goto
d) for
17) continue statement is used
a) to go to the next iteration in a loop
b) come out of a loop
c) exit and return to the main function
d) restarts iterations from beginning of loop
18) Which operator in C is called a ternary operator
a) if..then
b) ++
c) ?:
d) ()
19) Which of the following header file is required for strcpy() function?
a) string.h
b) strings.h
c) files.h
d) strcsspy()
20) The meaning of conversion character for data input is
a) Data item is a long integer
b) Data item is an unsigned decimal integer
c) Data item is a short integer
d) None of the above
21) The conversion characters for data input means that the data item is
a) An unsigned decimal integer
b) A short integer
c) A hexadecimal integer
d) A string followed by white space .....
Click here for Download PDF / FREE
Exercice in C PROGRAMMING / PDF
c programming example codes for amateurs
RépondreSupprimerc code system Clock and date