C Programming Questions Answers - Chapter 1 Online Quiz Test
-
1. If (*p) and **p is same
- No
- Yes
-
2. Difference between structure and union is
- We can define functions within structures but not within a union
- We can define functions within union but not within a structure
- The way memory is allocated
- There is no difference
-
3. What among following is true about stack
- stack cannot reuse its memory
- all elements are of different datatypes
- all operation done at one end
- none of above
-
4. To access the members of structure which symbol is used
- *
- -
- ,
- .
-
5. A member is a
- Variable in a structure
- Datatype of structure
- Structure pointer
- None of above
-
6. Structures can be used
- to hold different datatypes
- have pointers to structures
- to assign to one another
- all of above
-
7. UML meaning is
- Unique modeling language
- Unified modeling language
- Unified modern language
- Unified master laqnguage
-
8. printf() belongs to which library of c
- stdlib.h
- stdio.h
- stdout.h
- stdoutput.h
-
9. A variable in c
- must have a valid datatype
- can't have a name same as keyword
- must have a name starting with a character
- All of above
-
10. What is correct order of precedence in C
- Addition, Division, Modulus
- Addition, Modulus, Division
- Multiplication, Substration, Modulus
- Modulus, Multiplication, Substration
-
11. What is true about fputs function
- write to a file
- takes two parameters
- requires a file pointer
- all of above
-
12. Adding to a pointer that points to an array will
- Cause an error
- Increase the value of the element that the pointer is pointing to
- Cause the pointer to point to the next element in the array
- None of above
-
13. Which is invalid name of identifier
- world
- addition23
- test_name
- factorial
-
14. What is dangling pointer in c
- if pointer is pointing to a memory location from where variable has been deleted
- if pointer is assigned to more than one variable
- if pointer is not defined properly
- none of above
-
15. Wild pointer in C
- if pointer is pointing to a memory location from where variable has been deleted
- if pointer has not been initialized
- if pointer has not defined properly
- if pointer pointing to more than one variable
-
16. Disadvantage of array in C is
- We can easily access each element
- It is necessary to declare too many variables
- It can store only one similar type of data
- None of above
-
17. What is prototype of a function in C
- It is the return type of a function
- It is the return data of the function
- It is declaration of a function
- It is a datatype
-
18. Any type of modification on the parameter inside the function will reflect in actual variable value can be related to
- call by value
- call by reference
- both of above
- none of above
-
19. Size of void pointer is
- 1 byte
- 2 byte
- 4 byte
- 8 byte
-
20. What is wild pointer in c
- a pointer which we need to write in future
- a pointer which has bad naming convention
- a pointer which has no limit
- a point which has not initialized