0% found this document useful (0 votes)
96 views

Btech 1st Year Be2105 Programming in C 2017 PDF

This document contains questions for an exam on programming in C language. It asks students to: 1) Answer questions about data types, structures, pointers, recursion, static storage class, call by reference, operators and constants in C. 2) Design a menu-based program to perform mathematical operations on complex numbers and write a program to print prime numbers within a given range. 3) Write programs to perform matrix operations like inverse and multiplication. 4) Write programs to calculate LCM and HCF using functions and check if a string is a palindrome. 5) Write recursive and string programs and a program to find student details and subject averages using structures.

Uploaded by

deeptanshu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views

Btech 1st Year Be2105 Programming in C 2017 PDF

This document contains questions for an exam on programming in C language. It asks students to: 1) Answer questions about data types, structures, pointers, recursion, static storage class, call by reference, operators and constants in C. 2) Design a menu-based program to perform mathematical operations on complex numbers and write a program to print prime numbers within a given range. 3) Write programs to perform matrix operations like inverse and multiplication. 4) Write programs to calculate LCM and HCF using functions and check if a string is a palindrome. 5) Write recursive and string programs and a program to find student details and subject averages using structures.

Uploaded by

deeptanshu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

http://www.bputonline.com http://www.bputonline.

com
109 109 109 109 109 109 109 109

Registration no:

109 109 109 109 109 109 109 109


Total Number of Pages: 02 B.TECH
BE2105

1st Semester Back Examination 2016-17


PROGRAMMING IN ‘C’
BRANCH(S): ALL
109 109 109 109 Time: 3 Hours
109 109 109 109

Max Marks: 70
Q.CODE: Y723
Answer Question No.1 which is compulsory and any five from the rest.
The figures in the right hand margin indicate marks.

109
Q1109 Answer109 the following questions:
109 109 109 109
(2 x 10) 109

a) What do you mean by data type?


b) Differentiate between structure and union in C
c) What is a pointer?
d) What do you mean by recursion?
e) What is a static storage class?
f) What do you mean by Call by reference?
109 109 g) What are109different operators
109 used in C?109 109 109 109

h) What are various constants used in C?


i) Find the output of the program.
int main()
{
int i=0;
for(; i<=5; i++);
109 109
printf("%d",
109
i); 109 109 109 109 109
return 0;
}
j) Find the output of the following program.
int main()
{
int fun(int);
int i = fun(10);
109 109 printf("%d\n",
109 --i); 109 109 109 109 109

return 0;
}
int fun(int i)
{
return (i++);
}
109 109 109 109 109 109 109 109
1 Page

http://www.bputonline.com http://www.bputonline.com

109 109 109 109 109 109 109 109


http://www.bputonline.com http://www.bputonline.com
109 109 109 109 109 109 109 109

Q2 a) Why “switch” Statement is used? Design a Menu based program for (5)
addition, subtraction, multiplication and division of two complex
numbers.
109 109 109 109 109 109 109 109
b) Write a ‘C’ Program to print all Prime integers in between a given (5)
range. The Upper Limit and Lower Limit for that range are to be given
by the user through keyboard.

Q3 a) Write a Program in ‘C’ to find the Inverse of a 3X3 Matrix. (5)


b) Write a Program to input two 3X3 Matrix and multiply them. Display (5)
109 109
both input
109
Matrix and resultant
109
Matrix. 109
Use separate function
109
for input,
109 109
multiplication and display.

Q4 a) Write a program to find the Least Common Multiple and Highest (5)
Common Factor of two numbers. Use separate function for LCM and
HCF calculations.
b) Write a ‘C’ Program that takes a string as single parameter and returns (5)
the integer ‘1’ if the string is “Palindrome”, otherwise ‘0’ should be
109 109
returned.109 109 109 109 109 109

Q5 a) What do you mean by “Function Recursion”? Write a Program to find (5)


pq for given values of ‘p’ and ‘q’ using function recursion.
b) Write a ‘C’ Program to input a string and then return the Largest Word. (5)

109
Q6109 a) Write a 109
Program using 109
Structure to enter
109
the Name, Roll
109
No. and Six 109 (5) 109

Subjects marks for each student. Find the total and average marks of
each student and also the average marks in each subject in a class of
30 students.
b) Differentiate between “Function to Pointer” and “Pointer to Function”. (5)
Explain each concept with suitable example.
109 109 109 109 109 109 109 109

Q7 a) Write a Program in ‘C’ to create two text files. Provide user defined (5)
function that accepts the names of the above two files as arguments
and return ‘1’,if the number of characters are same in both files or else
it will return ‘0’ .
b) Write a Program for the addition of two integers using Command Line (5)
Argument.
109 109 109 109 109 109 109 109

Q8 Write short notes on the following (Any Two): (5 x 2)


a) Enumeration
b) Macro
c) Command line arguments
d) Self-referential structure
109 109 109 109 109 109 109 109
2 Page

http://www.bputonline.com http://www.bputonline.com

109 109 109 109 109 109 109 109

You might also like