C Langage Model Paper 2024

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

MODEL – I

Sample Question Paper


Program Name : BCA
Program Code : S102
DGSPGC
Semester : FIRST
College code-123
Course Title : Programming principal and algorithm
Max. Marks : 70 Times: 3 Hrs.

Instructions:
(1) All questions are compulsory.
(2) Illustrate your answers with neat sketches wherever necessary.
(3) Figures to the right indicate full marks.
(4) Assume suitable data if necessary.
(5) Preferably, write the answers in sequential order

Q.1) Attempt any FIVE of the following. 10 Marks


A) Define the term (i) identifier (ii) token.
B) State the use of break and continue statement.
C) State two differences between while loop and do while loop.
D) State the advantage of function.
E) Define pointers in C.
F) State any four features of pointer..
Q.2) Attempt any THREE of the following. 12 Marks
A) Distinguish between variable and constant.
B) Describe use of for loop with syntax and flowchart.
C) Define array. How array is declared write its syntax?
D) Explain recursion with example.
Q.3) Attempt any THREE of the following. 12 Marks
A) Enlist any four types of arithmetic operators used in C and give one example of
each.
B) Explain declaration and initialization of one-dimensional array with example.
C) Explain meaning of following statement with reference to pointers. int * a, b;
b = 20;
*a = b;
a = &b;
D) Explain how structure can be initialized with suitable example.
Q.4) Attempt any THREE of the following. 12 Marks
A) Write a program in ‘C’ to display hexadecimal, decimal, octal format of the entered
number.
B) Write a C program to convert a temperature of 600 C to the Fahrenheit scale using
the relationship F = (9/5)* C +32
C) Explain any four string handling functions from standard library function..
D) Write a ‘c’ program to add two numbers using pointers

Q.5) Attempt any TWO of the following. 12 Marks

A) Explain how ‘switch’ statement is used in the programs instead of ‘if-else’


statements with a suitable example program.
B) Write a C program to count the number of characters and print the vowels present
in entered text.
C) Write a C program to swap contents of two variables using call by reference.

Q.6) Attempt all of the following. 12 Marks


A) Write a C program to search a particular roll no. in an array. If that roll no. exist in
an array print “number is present" else print “number is absent".
B) Write a C program to find factorial of given number using recursion function.
MODEL – II
Sample Question Paper
Program Name : BCA
Program Code : S102
DGSPGC
Semester : FIRST
College code-123
Course Title : Programming principal and algorithm
Max. Marks : 20 Times: 1 Hrs.

Instructions: All questions are compulsory


1. Illustrate your answers with neat sketches wherever necessary
2. Figures to the right indicate full marks
3. Assume suitable data if necessary
4. Preferably, write the answers in sequential order
Q1. Attempt any Four (2*4=08)
1. Define token and identifier.
2. Explain use of for loop with syntax and flow chart.
3. List any two library functions with syntax.
4. Write the syntax of else if-ladder.
5. Write syntax of switch case.
6. Write a program to find the sum of digit of an integer
(Sum = 1 + 4 + 5 + 3 + 2 = 15)

Q2. Attempt any Three (3*4=12)


1. Write a program to demonstrate the use of printf and scanf statement to read and
print values of variables of different data types.
2. Write a program to determine whether a person is eligible to vote.
3. Write a program that displays the size of every data type.
4. Write use of comma operator in ‘for ‘loop.
5. Identify situation will you prefer to use while, do-while loop.
6. Write algorithm and draw flowchart to print prime numbers between 1 to 100.
7. Write a program to print following pattern.
1 1 1
2 2
3
MODEL – III
Sample Question Paper
Program Name : BCA
Program Code : S102
DGSPGC
Semester : FIRST
College code-123
Course Title : Programming principal and algorithm
Max. Marks : 20 Times: 1 Hrs.

Instructions: All questions are compulsory


1. Illustrate your answers with neat sketches wherever necessary
2. Figures to the right indicate full marks
3. Assume suitable data if necessary
4. Preferably, write the answers in sequential order

Q1. Attempt all (2*4=08)


1. Clarify the situation: when a function returns a value that does not match with the
return type of function?
2. State any four advantages of function.
3. State the difference between one dimensional and two dimensional arrays.
4. Write advantages of pointer.

Q2. Attempt all (3*4=12)


1. Write types of parameter passing methods in function and give one example of each.
2. Write a program to convert the given string "Hello" to "olleH" using recursion
3. Differentiate between * (arr+i) and (arr+i)

You might also like