Dr. Babasaheb Ambedklllr Technological University, Lonere - 402103  
End Scm,ester Examination  
Class: B. Tech (Computerl IT/E&TC/Electrical)  
Subject: Basic Computer Programming  
Semester: I  
Subject Code: CPIOS  
05 MAY 2017  
Maximum Marks: 60  
Time: 3 lIours  
nate:  
enggsolution.com  
1nstructions:  
I. All questions are compulsory ,111,1 each question carry 10 marks each.  
./'  
2
3
4
. Figures to right indicate fullm",ks.  
. Illustrate your answers with ne:",sketches, diagrams de. whenever necessary.  
. :'Ieeessary data is Rivenin respective question. If such data is not given, it means that  
knowledge of that data is part of examination.  
QI: A. Elilist some application areas which uses the programming paradigm in practical lield.  
Explain any two of them.  
(02)  
(03)  
B. Explain program, argorithm and data structure with suitable examples. Differentiate  
between algorithm and Oowcha"(,  
(05)  
(03)  
(03)  
(04)  
enggsolution.com  
Q2: A. \Vhat is Arithmetic instruction'! Explain all three modes ofC arithmetic statement.  
B. A character is entered by user through keyboard. write a program to calculate and print  
th" ASCII value oftha! entered character.  
C. Attempt any ONE from following.  
a) What is type casting? Explain it with suitable example.  
b) Differentiate between:  
i. Preincrementation and Postill<:lementation operator ill C.  
ii. = and = operator in C.  
Q3: A. i. Write a note on conditional operator in C.  
ii. If a user enters a number through keyboard, write a program to lind and print reverse  
of number and eheck whether number is palindrome number.  
(02)  
(04)  
B. Write output of following program.  
i) main()  
{
int i,j :  
fur ( i = 1 ; i <= 2 ; i+-t- )  
{
for (j = 1 ;j <= 2 ;j++ )  
{
if(i==j)  
continue;  
printf( "\n%d\t%d\n", i,j);  
}
}
}
(
02)  
ii) main()  
{
int i,j ;  
for ( i = I ; i <= 2 ; i+- )  
{
for (j = I ; j <= 2 ; j++ )  
{
if(i=j)  
break;  
printf ( H\n%d \t%d\nH, i, j ) ;  
}
}
}
(02)  
Q4: Atteml)t any TWO of the follo\\ing.  
A. What is Recursion? Explain with the help of an example program.  
B. Explain advantages ofusing functions in programming.  
Write a program to find square of an entered number using function.  
B. Write a program to find sum of all numbers divisible by 5 from 1 to 50 and draw a  
f1o,vchart for the same.  
(05)  
(02)  
(03)  
(05)  
Q5: Altem)t any TWO of the following.  
A. How Array elements are stored ill memory?  
De~cribe different ways in which an array is initialized. Which is the most generalized  
way of initialization?  
(02)  
(03)  
(05)  
C. Write a program to perform addition and subtraction of two 2x2 matrices if matrix  
elements are entered by user.  
D. An array has n elements where n is specified by user, write a method to search an  
element in that array using lincar s,oarch as a C program. Draw a flowchart for the same. (05)  
Q6: Attempt any TWO ofthc following.  
A. What is Structure? Explain with .111 example.  
(02)  
(03)  
De~cribe how structure elemcnts ar" accessed and stored.  
B. Write a program to enter and print data ofthrce books which contain. its namc, price  
and numbcr of pages using structur,:.  
C. How decisions are made in C usil1g Switch statement?  
If a user enters two numbers as a'1 input, write a program to perform Arithmetic  
operations on two entered numbers using switch statement.  
(05)  
(02)  
(03)  
*
-k******  
enggsolution.com