DR. BABASAHEB AMBEDKAR TECHNOLOGICAL UNIVERSITY  
LONERE RAIGAD 402103  
MID SEMESTER EXAMINATION October 2017  
-------------------------------------------------------------------------------  
Branch: B. Tech (All branches (GROUP A))  
Course: Basic Computer Engineering (ICT106)  
Semester: First  
Marks: 20  
Date:  
enggsolution.com  
Time: 1 Hr.  
-
------------------------------------------------------------------------------  
Q. No. 1 Multiple Choice Questions. (1 x 6 = 6 Marks)  
i)  
b) 0  
ii)  
d) DOnut  
a) 2  
iii)  
c) 3  
iv)  
enggsolution.com  
v)  
a) 1  
c) a  
0
vi)  
Q. No. 2 Attempt any one of the following. (1 x 6 = 6 Marks)  
a)  
b)  
1. Add header file and main function (1 M)  
2
3
4
. Declare the required variables (1 M)  
. Take input from user (1 M)  
. Use Logic (n&1==1)? display number is an ODD number : display  
number is an EVEN to user. (3 Marks)  
1. Add header file and main function.(1 M)  
2
3
4
. Declare the required variables.(1 M)  
. Take input from user.(1 M)  
. Use Logic  
years = days/365;  
weeks = (days % 365)/7;  
days = days- ((years*365) + (weeks*7));  
And Display the result in the format of years, weeks and days. (3 Marks)  
Q. No. 3 Attempt any two of the following. (2 x 4 = 8 Marks)  
a)  
When entering data via the scanf function, what relationships must there be  
between the data items and the corresponding arguments? (2 M)  
How are multiple data items separated from one another? (2 M)  
b)  
c)  
What is the need of precedence and associativity of operators in C? (1 M)  
Summarize bitwise operators, logical operators and assignment operators as  
per precedence and associativity with respect to each other. (for each  
operator 1 M)  
If a four-digit number is input through the keyboard, write a program to  
calculate the sum of its digits without using control flow statements. (2 M)  
calculate the amount of memory required to data types while program is  
executing on machine. Maximum amount memory =12 Byte (2 M)  
otherwise (1 M).  
Program: (Add header files and main function)  
int num, a, n;  
int sum = 0;  
printf("\n Enter a 4 digit number:")  
scanf("%d", &num);  
a = num % 10;  
n = num/10;  
sum = sum + a;  
a = num % 10;  
n = num/10;  
enggsolution.com  
sum = sum + a;  
a = num % 10;  
n = num/10;  
sum = sum + a;  
a = num % 10;  
n = num/10;  
sum = sum + a;  
printf(“\n The sum of the 5 digit of %d is %d",num, sum);  
*
****** End of Paper *******  
enggsolution.com