This document contains a class test with 3 questions for the subject Programming in C. The test has 20 total marks and all questions are compulsory. Question 1 has 2 parts worth 4 marks total, Question 2 has 3 parts worth 8 marks total, and Question 3 has 3 parts worth 8 marks total. The questions cover topics like recursion, function prototypes, structures, pointers, strings, matrices, and pointer advantages/chains.
This document contains a class test with 3 questions for the subject Programming in C. The test has 20 total marks and all questions are compulsory. Question 1 has 2 parts worth 4 marks total, Question 2 has 3 parts worth 8 marks total, and Question 3 has 3 parts worth 8 marks total. The questions cover topics like recursion, function prototypes, structures, pointers, strings, matrices, and pointer advantages/chains.
This document contains a class test with 3 questions for the subject Programming in C. The test has 20 total marks and all questions are compulsory. Question 1 has 2 parts worth 4 marks total, Question 2 has 3 parts worth 8 marks total, and Question 3 has 3 parts worth 8 marks total. The questions cover topics like recursion, function prototypes, structures, pointers, strings, matrices, and pointer advantages/chains.
CLASS: FYIF/FYCM TIME: 1 hr. SUB: PROGRAMMING in C (CPR - 9017) MARKS: 20.
Note: All the questions are compulsory.
Q.1 Attempt any two. (2*2) 4 1. Explain recursion with example. 2. Define: a) Function prototype. b) Scope and Visibility of variables. 3. Declare a structure to store the data of 60 students of FYIF, which will Contain information like name, age and marks. Q.2 Attempt any two. (4*2) 8 1. Write a program to determine two strings are equal or not by using pointers. 2. Write and justify the output of following program code float a [3] = {0.2, 0.8, 0.6}; if (a [1] =0.8) printf (“equal”); else printf (“Not equal”);
3. Point out the error if any in following program code
int a=10 , b=22 , *p, *q; p=&a; q=&b; *p=a*-* p / * q; printf(“%d”,*p);
Q.3 Attempt any two. (4*2) 8
1. What is the use of strcmp (), strlen (), strcat (), strcpy () function? 2. Write a program to find subtraction of two 3 X 4 matrices. Take input from User. 3. a. State any four advantages of using pointers in C. b. How to create a chain of pointers?