Engineering :: All Aptitude Test ::

Hassan
1. Find a correct C Keyword below
A. work
B. case
C. constant
D. work

2.Find a correct C Keyword.
A. Float
B. Int
C. Long
D. Float

3. Types of Integers are.?
A. short
B. int
C. long
D. short

4.Types of Real numbers in C are.?
A. float
B. double
C. long double
D. float

5.signed and unsigned representation is available for.?
A. short, int, long, char
B. float, double, long double
C. A & B
D. short, int, long, char

6.Size of a Turbo C C++ compiler is.?
A. 16 bit
B. 32 bit
C. 64 bit
D. 16 bit

7. Size of a GCC or Visual Studio C Compiler is.?
A. 16 bit
B. 32 bit
C. 64 bit
D. 16 bit

8.Sizes of short, int and long in a Turbo C C++ compiler in bytes are.?
A. 2, 2, 4
B. 2, 4, 4
C. 4, 8, 16
D. 2, 2, 4

9.Sizes of short, int and long in Visual Studio or GCC compiler in bytes are.?
A. 2, 2, 4
B. 2, 4, 4
C. 4, 4, 8
D. 2, 2, 4

10.Range of signed char and unsigned char are.?
A. -128 to +127 0 to 255
B. 0 to 255 -128 to +127
C. -128 to -1 0 to +127
D. -128 to +127 0 to 255

11. 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 65535 -32768 to +32767

12. Size of float, double and long double in Bytes are.?
A. 4, 8, 16
B. 4, 8, 10
C. 2, 4, 6
D. 4, 8, 16

13. Size of float, double and long double in Bytes are.?
A. 4, 8, 16
B. 4, 8, 10
C. 2, 4, 6
D. 4, 8, 16

14. Size of float, double and long double in Bytes are.?
A. 4, 8, 16
B. 4, 8, 10
C. 2, 4, 6
D. 4, 8, 16

15. Size of float, double and long double in Bytes are.?
A. 4, 8, 16
B. 4, 8, 10
C. 2, 4, 6
D. 4, 8, 16

16. Size of float, double and long double in Bytes are.?
A. 4, 8, 16
B. 4, 8, 10
C. 2, 4, 6
D. 4, 8, 16

17. Size of float, double and long double in Bytes are.?
A. 4, 8, 16
B. 4, 8, 10
C. 2, 4, 6
D. 4, 8, 16

18.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. -2147483647 to +2147483648 0 to 4294967295

19.Range of float variable is.?
A. -3.2e38 to +3.2e38
B. -3.8e32 to +3.8e32
C. -3.4e34 to +3.4e34
D. -3.2e38 to +3.2e38

20.Left most bit 0 in Singed representation indicates.?
A. A Positive number
B. A Negative Number
C. An Unsigned number
D. A Positive number

21.If you do not specify a storage class for a Variable.?
A. You get compiler error.
B. You get a compiler warning.
C. Output is null always
D. You get compiler error.

22.Comment on the output of this C code?
A. The compiler will flag an error
B. Program will compile and print the output 5
C. Program will compile and print the ASCII value of 5
D. The compiler will flag an error

23.The format identifier ‘%i’ is also used for _____ data type?
A. char
B. int
C. float
D. char

24.Which data type is most suitable for storing a number 65000 in a 32-bit system?
A. short
B. int
C. long
D. short

25.Which of the following is a User-defined data type?
A. typedef int Boolean;
B. typedef enum {Mon, Tue, Wed, Thu, Fri} Workdays;
C. struct {char name[10], int age};
D. typedef int Boolean;

26.What is the size of an int data type?
A. 4 Bytes
B. 8 Bytes
C. Depends on the system/compiler
D. 4 Bytes

27. What is short int in C programming?
A. Basic data type of C
B. Qualifier
C. short is the qualifier and int is the basic datatype
D. Basic data type of C

28.What is the output of this C code?
A. 5.477777
B. 5.477778
C. 5.478
D. 5.477777

29.Which of the following % operation is invalid?
A. 4 % 8;
B. 4 % 8l;
C. 4 % 8f;
D. 4 % 8;

30.Which data type is suitable for storing a number like? 10.0000000001
A. int
B. float
C. double
D. int


Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers