MVJ21CS13 Assignment 2
MVJ21CS13 Assignment 2
Write the answers for each question in A4 sheet and submit before the deadline
CO Code Course Outcomes
CO1 · Familiarize with writing of algorithms, fundamentals of C and philosophy of problem
solving.
CO Learning
Code Level
CO1 L1
a. Define computer. What are the characteristics of computer?
1
b. Give its advantages and disadvantages
7 Find errors, if any. In the following programs and write the error in CO1 L5
statements
a. int main()
{
/* Does nothing*/
}
b. #include(stdio.h)
void main(void)
{
Print(“hello C”);
}
c. Include <math.h>
Main{ }
(
FLOAT x;
X=2.5;
Y=exp(x);
print(x,y);
}
a. What are trigraph characters? How are they useful CO2 L2
8 b. Describe the four basic data types. How could we extend the
range of values they represent?
a. Describe the purpose of escape sequence characters CO2 L1,L2
9 b. What are variable and constants?
c. What is meant by the “value” of a variable?
a. What are enumeration variables? How are they declared? CO2 L2,L3,L5
b. When dealing with very small and very large numbers, what
steps would you take to improve accuracy of the calculations?
c. Which of the following are invalid constants and why?
i) 0.0001
ii) 5 x 1.5
10
iii) 99999
iv) +100
v) 75.45E-2
vi) “15.75”
vii) -1.79e+4
viii) 0.00001234