C Language Quiz (Set 11)

C Language (Set 1)

1 / 10

Which header file should be included to work with dynamic memory allocation functions?

2 / 10

What does the 'scanf' function in C do?

3 / 10

What is the correct syntax for a 'for' loop in C?

4 / 10

Which operator is used to access the value at a specific index in an array?

5 / 10

What is the output of the following C code?

\n\n```c\n#include <stdio.h>\nint main() {\n int i = 0;\n while (i < 5) {\n printf(\"%d \", i);\n i++;\n }\n return 0;\n}```

 

6 / 10

Which C keyword is used to define an enumeration?

7 / 10

What is the purpose of the 'sizeof' operator in C?

8 / 10

Which C library function is used to allocate memory for an array?

9 / 10

What is the correct way to initialize an integer variable 'x' with the value 10?

10 / 10

In C, which keyword is used to declare a function?

Your score is

The average score is 0%

0%