C Programming Questions Answers - Chapter 1
-
15. Out of following program :
float x = 10.7;
int i;
i = (int) x;
print i;
- null
- error
- 10
- garbage value
Answer :
Option C
-
16. total number of keywords in C are
- 30
- 32
- 48
- 132
Answer :
Option B
-
17. What is use of \r in c
- used to insert a vertical tab
- used to insert a tab
- places cursor at the end of line
- places cursor at the start of line
Answer :
Option D
-
18. UML meaning is
- Unique modeling language
- Unified modeling language
- Unified modern language
- Unified master laqnguage
Answer :
Option B
-
19. 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
Answer :
Option A
-
20. Due to variable scope in c
- Variables created in a function cannot be used another function
- Variables created in a function can be used in another function
- Variables created in a function can only be used in the main function
- None of above
Answer :
Option A
-
21. What will be the output of following program
#include
main()
{
int x,y = 10;
x = y * NULL;
printf(\"%d\",x);
}
- error
- 0
- 10
- Garbage value
Answer :
Option B