(1 Mark Each) : Programming in C
(1 Mark Each) : Programming in C
Programming in C
(1 mark each)
4. C is a ___ language
a) High Level
b) Low Level
c) Middle Level
d) Machine Level
1
ABBSOFT COMPUTERS
d) All of the above
2
ABBSOFT COMPUTERS
a) 8
b) 16
c) 32
d) 64
3
ABBSOFT COMPUTERS
23. The operator & is used for
a) Bitwise AND
b) Bitwise OR
c) Logical AND
d) Logical OR
4
ABBSOFT COMPUTERS
b) Left to Right
c) (a) for Arithmetic and (b) for Relational
d) (a) for Relational and (b) for Arithmetic
5
ABBSOFT COMPUTERS
c)
d)// " "
(2 marks each)
42. All of the above integer type plus the chair are called the………..float and double are called
the………….
a) Integral types, integral types
b) Float types, integral types
c) Both of the above
d) None of the above
44. What are the legal variable names that can be included in C program.
a) Printf, x1, gama, scanf
b) Break (), struct, best-yet, result
6
ABBSOFT COMPUTERS
c) X1, out-file, gamma, x
d) Pow, gets, x.1, result
45. The ……………….variable is not destroyed on exit from the function; instead its value is
presented and becomes available again. When the function is next called. These variables are
declared as ………………….
a) extern, localvariable
b) Static, global variable
c) Static, local variable
d) Exten, global variable
46. An …………..is a collection of variables of the same type. And they are declared like
this:
a) Arry, int height (10)
b) Structure, struct height
c) Enumerated, Enum height (2)
d) Classes, class height
a) B, BCLP
b) B, PCPL
c) B, BCPL
d) None of the above
a) Variables, process
b) Variables, programs
c) Structures, program
d) Constants, header files
49. ……………..allows the programs to interact with the screen, keyboard and file system of
your computer
a) # include (stdio.h>
b) #include <file.h>
c) #include <conio.h>
d) #include <math.h>
50. Curly brackets in C are used to group statements together as in a function, or in the body
of a loop. Such a grouping in known as a ……………..a ……………..
7
ABBSOFT COMPUTERS
d) None of the above
51 …………….is a library function used in C to display any output to the terminal. The text
to be printed is enclosed in…………….quotes.
a) Printf, Single
b) Printf, double
c) Scanf, double
d) none
56. The _________ and ______ operator are used when we want to test more than one
condition.(&&, ||)
57. Suppose that i is an integer variable whose value is 7 and f is floating point variable
whose value is 8.5. Evaluate the following expression : ( i + f)%4
a) 3
b) 3.5
c) 4
d) Invalid
58. What would be the value of x after execution of the following statements?
int x,y=10;
char z=’a’;
8
ABBSOFT COMPUTERS
x=y+z;
a) Invalid
b) 17
c) 107
d) 10a
59. There are two ways to categorize variables : By ___________ ,and by __________(data
type, storage class)
60. Strings in C are represented by array of characters. The end of the string is marked with a
special character, _________character, which is simply the character with the value 0. Ans it is
represented by another character escape sequence, ________(null, \0)
(4 marks each)
a) a iii, b i, c iv, d ii
b) a i, b ii, c i, d i
c) a ii, b iii, c ii, d iii
d) a iv, b iv, c iii, d iv
9
ABBSOFT COMPUTERS
a) Character, typedef, double, float
b) Chan, hond, typedef, double
c) Char, int, double, float
d) All of the above
10
ABBSOFT COMPUTERS
11
ABBSOFT COMPUTERS
72. Initially C was designed as a system programming long under…………….C
has…………, ………….statements and …………….calls to have a control over the
program flow.
74. An expression contains relational, assignment and arithmetic operators. If Parenthesis are
not present, the order will be
a) Assignment, arithmetic, relational
b) Relational, arithmetic, assignment
c) c)Assignment, relational, arithmetic
d) Arithmetic, relational, assignment
12