QuizFree
MAKAUT Programming for Problem Solving (ES-CS201) Practice: C Basics
This includes
- 10 questions · 10 marks
- 20 minutes
- Language: English
About quiz
10 questions on the ES-CS201 units: expressions, loops, arrays, functions, recursion, structures and pointers in C.
Test details
10Questions
10Marks
20 minDuration
1Sections
10 questions · 1 mark each · no negative marking. Solutions are shown after you submit.
Practice questions
Pick an answer and check it instantly
Q1. What does printf("%d", 7 / 2); print in C? (1 mark)
Q2. What is sizeof(char) in C? (1 mark)
Q3. With int a = 10, b = 3; what is the value of a % b? (1 mark)
Q4. Which loop always executes its body at least once? (1 mark)
Q5. For the declaration int a[5]; what is the index of the last element? (1 mark)
Q6. When an int is passed to a function by value and the function changes its parameter: (1 mark)
Q7. For char s[] = "hello"; what is sizeof(s)? (1 mark)
Q8. int x = 10; int *p = &x; *p = 20; What is the value of x now? (1 mark)
Q9. A recursive function returns n * fact(n - 1) for n > 1 and 1 otherwise. What is fact(4)? (1 mark)
Q10. Which header file declares printf and scanf? (1 mark)
Comments (0)
Login to comment.



