



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Mid semester examination question paper based on the language C.
Typology: Exams
1 / 5
This page cannot be seen from the preview
Don't miss anything!
for(i=0;s[i]!=’\0’;i++); printf(“%d\n”, i); Ans: 5 2 marks Only one value will be printed. Marks will be given only for this answer. For any other answer (even containing 5) will get 0 marks.
See the code below: #include<stdio.h> int hello(int n) { return n++; } void main() { int n=5; n=hello(n++); printf("%d"\n, n); } What will be printed? Use the two '++' operators in suitable ways so that the output is 7. Answer: 5 Write ++n in place of n++ for both the cases. 2 marks: 1 mark for each correct answer