Advanced Programming in C
Advanced Programming in C
Total Pages : 2
BCA/M-21 1887
ADVANCED PROGRAMMING IN C
Paper–BCA-121
Time Allowed : 3 Hours] [Maximum Marks : 80
Note : Attempt five questions in all, selecting one question from each Unit.
Question No. 1 is compulsory. All questions carry equal marks.
Compulsory Question
1. (a) Is string a Data type in C? If not, how can you declare a string in C?
(b) Comment on the use of typedef in C.
(c) How can you declare and define a Pointer variable?
(d) Name the various functions for Dynamic memory allocation.
(e) How can you create a File in C?
(f) Name the various types of Files that can be created in C.
(g) What is meant by Preprocessor directive?
(h) What is meant by Command line arguments? 8×2=16
UNIT–I
2. Write a program in C to find a given string in a text and display its location
if found otherwise display not found. 16
3. What is meant by Structures and Unions? How they are used in C? Explain
by writing suitable programs for both. 16
UNIT–II
4. Discuss the various Operations that can be performed on Pointers in C
using suitable examples. Also describe the various Operations that can’t be
perfomed on pointers. 16
5. Write a program in C to sort a given list of Strings. 16
UNIT–III
6. Explain following functions in C using suitable examples : 16
(a) fseek() (b) rewind() (c) fflush() (d) feof().
1887/K/186 P. T. O.
7. Write a program in C to read the Contents of a file, covert them into
uppercase and copy to another file. 16
UNIT–IV
8. Explain following using suitable exmples in C : 16
(a) #define (b) #include (c) #if (d) #undef.
9. Write a program in C to read a number from Command line argument and
check whether the input number is prime or not. Also print error message
if the argument is not an integer. 16
1887/K/186 2