Semester : SEMESTER 1
Subject : Problem Solving and Computer Programming
Year : 2016
Term : DECEMBER
Branch : MCA
Scheme : 2016 Full Time
Course Code : RLMCA 101
Page:2
10.
11.
12
13.
C1A002 Total No. of Pages:3
printf(“%d”, y[0]);
printf(“The value of the expression++(*p1) - *p3:”, ++(*p1) - *p3);
|
Describe the various file opening modes used with the fopen() function.
Define MACROS.
PART 8
Answer any one question from each module. Each question carries 6 marks.
MODULE - I
a. Write an algorithm for measuring 4 litre of water if only 5 litre and 3 litre jugs are
available. Also draw the flowchart for the problem. (4)
b. What is a symbolic constant? During the compilation process, what happens to
symbolic constant that appear within a C program. (2)
OR
What do you mean by structured programming? State the properties of structured
programming
MODULE - II
a, Briefly mention about the various unary operators available in C. (3)
b. Interpret the meaning of control string in the scanf functions: (3)
scanf(“%12ld 9050 %6f %०", &a, &b, ಹಂ, &d);
scanf(“ %[\n]”, 7);
scanf(“ %[ ABCDEFG]”,f);
OR
. Write a program to read a string, then encode the word on a letter by letter basis by
subtracting 30 from the letter’s ASCII value; display the original string, encoded string and
the string length. (Use gets(), puts())
MODULE - III
Write a main function which implements the user defined functions that are used to
interchange the largest and the smallest number in the array
OR
Page 2 of 3