Answer ANY FIVE Questions. (5x4=20) 1. Write a program in C generate a multiplication table of a given number using while loop with the flowchart. 2. Write a program to find the maximum and minimum element in a given array 3. Write a program to print the following pattern. 1 PRE-TEST EXAMINATION PAPER 1 2 1 2 3 Program : BSc.IT 1 2 3 4 1 2 3 4 5 Course : Introduction C Programming 4. Consider a text file named “Myinfo.txt”. Write a program to read the content of the given file and display its content in console/terminal Course Code : CT018-3-1 5. How a nested structure can be created? Demonstrate with example and also show how can we access the data member of a nested structure Year/ Semester : I Year / I Semester 6. Write a pseudocode and program to find whether the given number is prime or not 7. Create a function that takes a string as input and returns the number of unique Intake : September,2023 characters in it. Date : 9th February 2024 SECTION C LONG ANSWER QUESTIONS Time Duration : 1.5 Hours Answer ANY TWO Questions. (2x10=20) 1. Define a structure named Employee with attributes for employee ID, name, Set :C and salary and Address with attributes street, city, zip code. Extend the Employee structure to include Address structure as an attribute. Create a function updateSalary that takes an array of employees and gives a 10% salary raise to those earning less than 50,000. Write a function to display the Instruction to candidates details of employee with their address. 1. This question paper has Three (3) Sections. 2. You are assigned to develop a program to manage student records. Consider the following requirements: [Mandatory Question] 2. Answer ALL questions in Section A, Very Short Answer Questions. a. Define a structure named Student including data members: StudentID, 3. Answer Five out of Seven questions in Section B, Short Answers Questions. StudentName, Grades b. Create a function name inputstudent taking Student structure as an 4. Answer Two out of Three question in Section C, Long Answers Questions. argument. This function should ask user to input student details 5. No scripts or answer sheets are to be taken out of the Examination Hall. c. Create a function name displaydata taking Student structure as an argument and display all data 6. Mobile phones are strictly prohibited in the Examination Hall. d. Implement function named writetofile to write student record to a file called “student.txt” e. Create a function to calculate average grade of all students 3. Design a menu-driven C program for a simple banking system with the Do not open this question paper until instructed. following options using functions. a. Display account balance b. Deposit money c. Withdraw money d. Exit SECTION A c. To declare the return type of the function Very Short Answer Questions (10x1=10) d. To declare the function name, its parameter types and return type 8. What will be the output of the following code? 1. What is the output of the following code? #include <stdio.h> #include <stdio.h> void function() { int main() { int first = 10, second = 20; int x, y = 6, z = 6; int third = first + second; x = y == z; { printf("%d", x); int third = second - first; return 0; printf("%d ", third); } } a. 0 c. 6 printf("%d", third); b. 1 d. Compile error } 2. What is the result of logical or relational expression in C? int main() { a. True or False Function(); b. 0 or 1 return 0; c. 0 if an expression is false and any positive number if an expression is } true a. 10 20 c. 20 10 d. None of the mentioned b. 30 10 d. Compilation Error 3. What is the output of the following code? #include <stdio.h> 9. What is the output of the following code? int main(){ int i=10; #include <stdio.h> printf("%d",i++); int main() return 0; { } int a[5] = {11,22,33,44,55}; int *p; 4. Which is the correct way of initializing an array? p = &a[0]; a. Char name[ ] = “Techspire” p++; b. char name[10] = “Techspire” printf("%d, %d",*p,*(p+1)); c. Char name [ ] = “Techspire” return 0; d. char name = “Techspire” } 5. Preprocessor Directive in C language starts with? a. 11 22 c. 11 33 a. @ c. $ b. 22 33 d. 22 44 b. # d. & 6. 6. What is the output of the following code? 10. What is the output of the following code? int i = 5; do { #include <stdio.h> printf("%d ", i--); int main(){ } while (i > 0); int A[5]= {1,2,3,4,5}; printf("%d",sizeof(A)/sizeof(A[0])); } 7. What is the purpose of a function prototype in C? a. To declare the function name and return type b. To define the implementation of a function