1) Identify wrong C Keywords below.
A) auto, double, int, struct
B) break, else, long, switch
C) case, enum, register, typedef
D) char, extern, intern, return
Explanation:
'intern' is not a keyword. Remaining are all valid keywords.
2) Identify wrong C Keywords below.
A) union, const, var, float
B) short, unsigned, continue, for
C) signed, void, default, goto
D) sizeof, volatile, do, if
Explanation:
'var' is not a valid keyword.
3) Identify wrong C Keywords below.
A) static, while, break, goto
B) struct, construct, signed, unsigned
D) return, enum, struct, do
Explanation:
construct is not a keyword.
All 32 Keywords are given for reference. auto, break, case, char, const, continue, default, do, double, else, enum, extern, float, for, goto, if, int, long, register, return, short, signed, sizeof, static, struct, switch, typedef, union, unsigned, void, volatile, while.
4) Find a correct C Keyword below.
A) breaker
5) Find a correct C Keyword below.
A) work
6) Find a correct C Keyword.
A) Float
Explanation:
All C Keywords are in lower case.
7) Types of Integers are.?
A) short
Explanation:
Size of int < long.
8) Types of Real numbers in C are.?
A) float
Explanation:
Size of float < double < long double
9) signed and unsigned representation is available for.?
A) short, int, long, char
B) float, double, long double
Explanation:
Real numbers like float, double and long double do not support unsigned representation.
10) Size of a Turbo C C++ compiler is.?
A) 16 bit
11) Size of a GCC or Visual Studio C Compiler is.?
A) 16 bit
12) Sizes of short, int and long in a Turbo C C++ compiler in bytes are.?
A) 2, 2, 4
13) Sizes of short, int and long in Visual Studio or GCC compiler in bytes are.?
A) 2, 2, 4
14) Range of signed char and unsigned char are.?
A) -128 to +127
0 to 255
Explanation:
Advantage of an unsigned representation is only to increase the upper limit i.e positive limit. Size of a char remains same i.e 1 Byte.
15) Ranges of signed int and unsigned int are.?
A) 0 to 65535
-32768 to +32767
B) -32768 to +32767
0 to 65535
C) -32767 to +32768
0 to 65536
D) 0 to 65536
-32767 to +32768
Explanation:
Default assumption is Turbo C/C++, 16 bit compiler. Size of an int is 2 bytes for both signed and unsigned representation.
16) Size of float, double and long double in Bytes are.?
A) 4, 8, 16
Explanation:
Real numbers are represented in float, double and long double format.
eg. float interest = 12.55f;
17) Range of singed long and unsigned long variables are.?
A) -2147483647 to +2147483648
0 to 4294967295
B) -2147483648 to +2147483647
0 to 4294967296
C) -2147483648 to +2147483647
0 to 4294967295
D) 0 to 4294967295
-2147483648 to +2147483647
Explanation:
Size of a long variable is 4 Bytes or 32 bits.
(2)^32.
18) Range of float variable is.?
A) -3.2e38 to +3.2e38
Explanation:
e represents exponential.
19) Left most bit 0 in Singed representation indicates.?
A) A Positive number
Explanation:
For negative numbers 1 is used as a left most bit.
20) If you do not specify a storage class for a Variable.?
A) You get compiler error.
B) You get a compiler warning.
Explanation:
Yes. Even if you do not specify a Storage class for a Variable, AUTOMATIC storage class is applied.