0% found this document useful (0 votes)
25 views4 pages

Model Paper 1 Dean Format Final

This document is a model question paper for the Fundamentals of Programming using C course at RV College of Engineering. It includes two parts: Part-A consists of short answer questions, while Part-B contains longer questions requiring detailed answers or programming tasks. The exam duration is 3 hours and the maximum marks are 100.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views4 pages

Model Paper 1 Dean Format Final

This document is a model question paper for the Fundamentals of Programming using C course at RV College of Engineering. It includes two parts: Part-A consists of short answer questions, while Part-B contains longer questions requiring detailed answers or programming tasks. The exam duration is 3 hours and the maximum marks are 100.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

RV College of Engineering, Bengaluru-560059

( Autonomous Institution affiliated to VTU, Belagavi )


Department of Computer Science and Engineering
Model Question Paper
First Semester Autonomous Examinations
22ES14A
Fundamentals of Programming using C
Duration: 3 Hours Max marks: 100
Note: Answer all the questions from Part-A
Answer any 5 full questions from Part-B choosing one from each choice.(Question number 2 is
compulsory)

PART-A
Marks CO BTL PO PI
CODE
1.1 1 1 1 1 1.6.1
Reading and printing characters symbol in flowchart is
represented using _____________.
1.2 1 2 2 2 2.5.2
Write an algorithm to find the area of Circle.
1.3 1 1 2 1 1.6.1
The format identifier ‘%d” is used for _____ data type.
1.4 1 2 3 2 2.5.2
Write the output of the following program:

#include<stdio.h>

main()

printf(“%d”,’a’);

}
1.5 _______ operator returns the number of bytes occupied by the 1 1 1 1 1.6.1
operand
1.6 The _____ specification is used to read/write a hexadecimal 1 1 1 1 1.6.1
integer
1.7 Write the output of the following code? 2 1 2 2 2.5.1

#include<stdio.h>

int main()

int x=3, y=5, z=7;


int a,b;

a = x * 2 + y / 5 – z * y;

b = ++x * (y – 3) / 2 – z++ * y;

printf(“\n a = %d”, a);

printf(“\n b = %d”, b);

return 0;

1.8 Is the loop in the following program a finite or infinite loop? 1 1 2 2 2.5.1
#include <stdio.h>
int main()
{
for(;;)
{
printf("Hi! ");
};
return 0;
}

1.9 The statement arr[3] = 10; initializes the _________ element of 1 1 1 1 1.2.1
the array with value 10.
1.10 Can a two-dimensional array of specific data type have data of 1 1 2 1 1.2.1
two different data types?
1.11 Output of the following program is ____________. 1 2 3 2 2.5.3
#include <stdio.h>
int main()
{
int a=3;
if(a-3)
{
printf("\nHello RVCE!");
}
if(1)
{
printf("\nHello RVCE, Happy to study here!");
}
return 0;
}

1.12 What is the significance of the instruction strcpy (str1,str2)? 1 2 2 1 1.6.1


1.13 Write a snippet of code to display your name on the monitorCO2. 1 2 2,2 1 1.6.1
1.14 The number of value the function can return is _____________. 1 2 2 1 1.6.1

1.15 What is a function prototype? Where can you place these 2 2 2 1 1.6.1
prototypes in a C program?
1.16 Give two difference between Recursion and Iteration. 2 2 2 4 4.4.1
1.17 Define the structure named Student with the following members: 1 4 2 1 1.6.1
Name, Age, USN, Marks of 6 subjects.

PART-B
2 a. With an example, explain the structure of C program. 8 1 1 1 2.1.2
b. What is a computer? With a neat diagram explain the components 8 1 1 1 2.1.2
of a computer system.

3a. Write a short note on basic data types that the C language supports. 6 1 1 1 1.4.1
b. Differentiate between typecasting and type conversion 4 1 2 1 1.4.1
c. Write a program to count number of vowels and consonants 6 2 3 2 2.2.4
OR
4 a. Explain the terms variables and constants. How many type of 4 1 1 1 1.4.1
variables are supported by C?
b. Write a program to calculate salary of an employee, given his basic 6 2 3 2 2.2.4
pay (to be entered by the user), HRA=10% of the basic pay,
TA=5% of basic pay. Define HRA and TA as constants and use
them to calculate the salary of the employee.
c. Write a program to prepare a grocery bill. For that enter the name 6 3 3 2 2.2.4
of the items purchased, quantity in which it is purchased, and its
price per unit. Then display the bill in the following format.

5 a. Write a program to print a multiplication table of a given number, 6 4 3 3 3.8.2


after printing the multiplication table the program should ask the
user “Do you want to continue [Yes/No]? ”. If a user enters “y” or
“Y”, then the program should print a multiplication table of the
given new number and if the user enters “n” or “N”, then the
program should exit.
b. Write a program to print a Pascal Triangle of 5 5 4 3 3 3.8.2
c. Write a program to delete all the duplicate entries from an array of 5 4 3 3 3.8.2
n integers.
OR
6 a. Differentiate else-if ladder from switch-case. Write a program to 6 2 2 2 2.5.2
read the numbers n1 and n2 and perform arithmetic operations
according to input of user choice, for example if user enters choice
value 1, then program should perform addition of n1 and n2 and so
on.
b. Illustrate the concept of nested if-else with a simple example. 4 2 2 2 2.5.2
c. Write a program that reads two matrices A and B, and compute and 6 4 3 3 3.8.2
print the product matrix of A and B.

7 a. Write a C program which uses a pointer to access the array 8 2 3 3 3.6.2


elements without using the length of the string.
b. Explain any four common operations performed on Character 8 1 2 2 2.5.2
strings.
OR
8 a. Define a Function and mention its uses. Write a C program to sort 8 2 3 3 3.6.2
the numbers using the Selection sort using function.
b. Write a C program to sort the elements using Bubble Sort technique 8 3 3 3 3.6.2
using function.

9a. With examples, explain different types of structure initialization. 10 2 2 2 2.5.2


b. Define Recursion. Write a C program to find the factorial of a 6 2 3 3 3.7.1
given number using recursion.
OR
10 Write a C program to swap two numbers using functions by passing 8 4 3 3 3.7.1
a. parameters by reference .
Define pointers. Explain the use of & and * operators in pointers 8 1 2 2 2.8.2
b. with suitable examples.

You might also like