Competitive Programming
Time: 3 hours Max. Marks: 70
Note: 1. Question Paper consists of two parts (Part-A and Part-B)
2. Answering the question in Part-A is Compulsory
3. Answer any THREE Questions from Part-B
PART –A
1. a) “C is a structured language”. Justify the validity of the statement. (3M)
b) Write the differences between break and continue. (4M)
c) Compare static and extern storage classes. (4M)
d) What is dangling memory problem? How to solve it? (4M)
e) Write any three applications of Union. (3M)
f) Differentiate between scanf and fscanf functions with examples. (4M)
PART -B
2. a) Draw a flowchart to count positive and negative numbers in a given list
terminated with zero.
(8M)
b) Write an algorithm for finding whether the given number is Armstrong or not. (8M)
3. a) Write a C program to multiply two ‘m × n’ matrices. Cover all necessary
conditions.
(8M)
b) Discuss the various string functions that can be performed on strings. (8M)
4. a) Write a C program with recursive function that counts the number of vowels in a
string.
(8M)
b) Write a C program to check whether a given character is a vowel or not. (8M)
5. a) Write a C program to swap two numbers using pointers and functions. (8M)
b) Write a program to read an array as user input, access elements of an array and
copy array into another array using pointers.
(8M)
6. a) Write a C program using a pointer to structure illustrating the initialization of the
members in the structure.
(8M)
b) How do you declare, initialize and access a structure containing arrays? Explain
the same with examples.
(8M)
7. a) Write a program that opens a file and deletes the blank spaces. (8M)
b) Write a C program to write all the members of an array of structures to a file
using fwrite(). Read the array from the file and display on the screen.
(8M)
Comments
Post a Comment
Please Subscribe and Comments my blog site.