Ticker

6/recent/ticker-posts

Header Ads Widget

Responsive Advertisement

nqt technical questions

Q1. Which of the following is a collection of different data types?

A. String
B. Structure
C. Array
D. None of these

Ans. B

Q2. In C, if you pass an array as an argument to a function, what actually gets passed?

A. Value of elements in array
B. First element of the array
C. Base Address of the array
D. Address of the last element of array

Ans. C

Q3. Are the expressions arr and &arr same for an array of 10 integers?

A. True
B. False

Ans. B

Q4. Where the local variables are stored?

A. Stack
B. Heap
C. Disk
D. None of these

Ans. A

Q5. Print the output of following code :

main()
{
if(-1)
printf(“True”);
else
printf(“False”);
}

A. True
B. False
C. True False
D. Error

Ans. A

Q6. What will happen if in a C program you assign a value to an array element whose subscript exceeds the size of array?

A. The element will be set to 0.
B. The compiler would report an error.
C. The program may crash if some important data gets overwritten.
D. The array size would appropriately grow.

Ans. C

Q7. Process in which source code is combined with object code is termed as :

A. Linker
B. Loader
C. Linking
D. None of these

Ans. C

Q8. For 32 bits environment, size of ‘int’ data type is :

A. 2 Bytes
B. 4 Bytes
C. 8 Bytes
D. None of these

Ans. B

Q9. In C, the names of variables, functions, labels, and various other user-defined items are :

A. Keywords
B. Tokens
C. Identifiers
D. None of these

Ans. C

Q10. Variables that are declared inside a function are :

A. Constants
B. Literals
C. Global
D. Local

Ans. D

Q11. ______ is the collection of similar-type elements ?

A. Structure
B. Union
C. Array
D. String

Ans. C

Q12. What can not be declared :

A. Array of Integers
B. Array of Pointers
C. Array of Structures
D. None of these

Ans. D

Q13. Which of the following is not a arithmetic operation :

A. n/=10
B. n*=10
C. n+=10
D. n!=10

Ans. D

Q14. Which datatype is not applicable for mod(%) operation ?

A. int
B. float
C. char
D. None of these

Ans. B

Q15. Strings are character arrays. The last index of it contains the null-terminated character :

A. \t
B. \n
C. \0
D. \o

Ans. C

Q16. Which of the following is a collection of different data types?

A. String
B. Structure
C. Array
D. Files

Ans. B

Q17. Which has the highest precision ?

A. float
B. double
C. long int
D. unsigned long int

Ans. B

Q18. Which of the following is a user-defined data type ?

A. long int
B. double
C. unsigned long int
D. enum

Ans. D

Q19. Which of the following are Abstract Datatypes ?

A. int
B. structure
C. char
D. float

Ans. B

Q20. Which of the following is for releasing memory by dynamic memory allocation ?

A. release
B. revoke
C. allod
D. free

Q21. In the standard library of C programming language, which of the following header file is designed for basic mathematical operations?

A. conio.h
B. stdlib. h
C. math.h
D. calc.h

Ans. C

Q22. int **p; What does this mean ?

A. pointer to int
B. pointer to pointer
C. error
D. None of these

Ans. B

Q23. Variables can be started with :

A. !
B. $
C. _
D. .

Ans. C

Q24. All keywords in C are written in :

A. upper case
B. lower case
C. camel case
D. None of the above

Ans. B

Q25. Which keyword is responsible for skipping the current iteration ?

A. break
B. continue
C. return
D. pass

Ans. B

Post a Comment

0 Comments