Engineering FE Engineering Common Sem 2 C Programming Mar 2021 R16 Online Question Paper - Mumbai University | munotes
This paper is solved: read the model answers.
Loading PDF...
Questions asked in this paper
Solved paper All 32 questions answered in full Exam-ready answers, the reasoning behind each one, and what the examiner is looking for. Open the solutionsQ1 Q1. Choose the correct option for following questions. All the Questions are compulsory and carry equal marks.
-
1. Which of the following is a collection of programs that interfaces with a hardware? Option A: Application software. Option B: System software. Option C: All the user written application programs. Option D: Spreadsheet software. 2 marksRead the model answer
-
2. Which of the following is not the advantage of the compiler in comparison to the interpreter. Option A: Fast in debugging. Option B: Less execution time. Option C: Scan the entire program before translating it into machine code. Option D: Do not run the code till all the errors are removed. 2 marksRead the model answer
-
3. Which of the following backslash character indicates ASCII null character? Option A: \n. Option B: \NULL. Option C: \x. Option D: \0. 2 marksRead the model answer
-
4. Which of the following has highest operator precedence in C language? Option A: Option B: &. Option C: ==. Option D: /. 2 marksRead the model answer
-
5. Which of the following is not a selection or branching type of program control statement in C language? Option A: if. Option B: switch. Option C: for. Option D: goto. 2 marksRead the model answer
-
6. What will be the output of the following code? #include<stdio.h> void main() { int a=10; if(a==10) print("yes"); else printf("no"); } Option A: yes. Option B: no. Option C: 10. Option D: Compile time error. 2 marksRead the model answer
-
7. What will be printed by the code below? #include<stdio.h> void main() { float x= 23.4; if(x<100) printf("1"); if(x<200) printf("2"); else printf("3"); } Option A: 1. Option B: 12. Option C: 123. Option D: 2. 2 marksRead the model answer
-
8. What will be the output of the following code? #include<stdio.h> void main() { int a=10, b=20, c=30, d; d=c>b?c:b>a?b:a; printf("%d",d); } Option A: 10. Option B: 20. Option C: 30. Option D: 0. 2 marksRead the model answer
-
9. What will be the output of following code? #include<stdio.h> void main() { int i; for(i=1; i<3; ++i) printf("i"); } Option A: i. Option B: ii. Option C: iii. Option D: iiii. 2 marksRead the model answer
-
10. Which of the following declared variable will not be stored in RAM or primary memory? Option A: int a; Option B: static int a; Option C: extern int a; Option D: register int a; 2 marksRead the model answer
-
11. What will be the output of the following code? #include<stdio.h> void xyz(int *a) { ++*a; } void main() { int a=10; xyz(&a); printf("%d",a); } Option A: 0. Option B: 9. Option C: 10. Option D: 11. 2 marksRead the model answer
-
12. What will be the value of b[1] element if an array is declared and defined as int b[]={1,2,3}; Option A: 1. Option B: 2. Option C: NULL. Option D: 0 or Garbage value. 2 marksRead the model answer
-
13. Which of the following is valid string declaration? Option A: String s = "char"; Option B: Char s="string"; Option C: char s[]="char"; Option D: String s[]="String"; 2 marksRead the model answer
-
14. What will be the output of following code? #include<stdio.h> struct { int a,b; }s; void main() { a=10; b=20; printf("%d %d",s.a, s.b); } Option A: 10 20. Option B: 20 10. Option C: 00. Option D: Error. 2 marksRead the model answer
-
15. What will be the output of the following code? #include<stdio.h> #include<string.h> void main() { char a[] = "hello"; char b[] = "Hello"; printf("%d",strcmp(a,b)); } Option A: Negative value. Option B: 0. Option C: Positive value. Option D: Error. 2 marksRead the model answer
-
16. What will be the output of the following code? #include<stdio.h> void main() { int i; char a[]="hi\0xyz"; puts(a); printf("hello"); } Option A: hi\0xyz. Option B: hi\0xyz / hello. Option C: hihello. Option D: hi / hello. 2 marksRead the model answer
-
17. What is the output of the following code? #include<stdio.h> void main(){ int a = 010; printf("%x",a); } Option A: 1. Option B: 4. Option C: 8. Option D: 10. 2 marksRead the model answer
-
18. Which of the following file opening mode opens a text file in read mode only in fopen(). Option A: r. Option B: rb. Option C: r+. Option D: rb+. 2 marksRead the model answer
-
19. What will be the output of the following code? #include<stdio.h> void main() { int a[] = {10,12,6,7,2}; int *p; p=a+4; printf("%d",*p); } Option A: 12. Option B: 6. Option C: 7. Option D: 2. 2 marksRead the model answer
-
20. What will be the output of following code? #include<stdio.h> void main() { int a=10; int *p=&a; (*p)++; printf("%d",*p); } Option A: 10. Option B: 11. Option C: Garbage value. Option D: Compile time error. 2 marksRead the model answer
Q2 Q2. Solve any Four out of Six questions below. 5 marks each. Total 20 marks.
-
A What are the different symbols used in the flowchart? Also draw a flowchart to decide a number is even or odd. 5 marksRead the model answer
-
B Write a program to determine entered year is leap year or not? 5 marksRead the model answer
-
C Write a program to print following output. ****/***/**/* 5 marksRead the model answer
-
D Write a program to read two strings from the user, print length of both strings. Also search if the first string is present in second string or not? Use proper string manipulation function from string.h of the C language. 5 marksRead the model answer
-
E Write a program to read details of N staffs (id, name, age) using suitable user defined data type. Print these details in the tabular format. 5 marksRead the model answer
-
F Write a program to swap two numbers using call by reference. 5 marksRead the model answer
Q3 Q3. Solve any Four out of Six questions below. 5 marks each. Total 20 marks.
-
A Write logical and bitwise operators supported in the C language. Write the operator symbol(s), name of the operator, and example use of each of the operator. 5 marksRead the model answer
-
B Write a program to find the smallest among three numbers using nested if-else statements. 5 marksRead the model answer
-
C Write all the storage classes in C language with respect to keyword, place of storage, scope of the variable, lifespan and default value of the respective storage class. 5 marksRead the model answer
-
D Write a program to read N numbers from the user in an array and print the largest number among them. 5 marksRead the model answer
-
E Write the differences between struct and union user defined data type of the C language, with an example code. 5 marksRead the model answer
-
F Write a program to open the already existing text file in read mode, print the contents of that text file, and close the file. 5 marksRead the model answer
Read from the scan above, so a character or two may differ. The scan is the original.
What do you need?
Tap one.
The answers are on this page
You can read the first answer here. The box further down shows how to read all of them.
Read it here, any time
We keep checking and updating our papers and notes, and adding more. A saved copy would be an old version. Reading on munotes.in always gives you the latest one.
I paid, but I can't open it
Please type an email, or a 10-digit phone number.
Done
If we find your payment, we send a link to the email you paid with. Open it to read.
Check your email in 2 minutes. Also check Spam.
No email after 10 minutes?
Something else
Please write a little more, so we can help.
Your email app opens with this. You can add more there. We reply by email.
Something wrong on this page? Report it and we will check it against the scan.
Quick Help
Related Resources
Something wrong with this paper? Report it.