Q1. (A) Answer the following (any four) programming languages types.

advertisement
Q1. (A) Answer the following (any four)
a. What is program? What is programming? Show only names of
programming languages types.
b. write an algorithm to find minimum of two no.
c. Write an algorithm to find area of circle.
d. what is flowchart? Hoe it is useful in program development.
e. draw a flowchart to print sum of odd no from 1 to 50.
(b) answer the following: (any two)
a. explains any four characteristic of higher level languages.
b. what is variable? Why they declared with data types.
c. give list of various operator in c. also mention their use in single line
for each.
Q2. Answer the following (any four)
a. What is type casting? Why it is needed? Justify your answer with
an example.
b. “if else is two way decisions, while multiple if else is multi way
decision”. Clear this statement by example.
c. Consider the following:
……
Y=0;
If(x>5)
If(x<15)
Y++;
Else
y--;
printf (“%d”, y);
…..
Give the output of the above:
a. X=4, y=?
b. X=10, y=?
c. X=17, y=?
D. what is meant by the exit control loop? Which loop comes under
this type?
E which an array? In which situation it is useful?
F. gives an example of nested loop with for loop.
(b) state the true or false:
1. every “c” language program need not have main function.
2. the printf () function automatically prints a new line character at
the end of execution.
3. c is not a case sensitive language.
4. do…. While is exit controlled loop.
5. variables are always in small (lowercase) letters.
Q3. (a) answer the following (any two)
1. What is string? Show various function for reading and printing
string with an example for each.
2. What are users’ defined functions? Why we need to design user
defined functions?
Design a function to find factorial of any given no and call it in
main function.
3. Give concept of structure and unions? Design a structure as per
following requirement roll no name activity.
(B) answer the 3 to 5 lines :( any three)
1. what is function prototyping? Show the prototyping of function.
2. what is modulo operator?
3. what is recursion in function? Give example?
4. what is storage class? What is importance of it? Show only
names of various storage classes.
Q4.A Answer the following (any two)
1. Write a function program to sum of square of first n numbers,
where n is entered through the keyboard.
2. Write the program to count numbers of negative, positive or zero
elements of an array
3. Write a program using function to exchange the values stored in
two locations in the memory.
(B) answer the following (any 2)
1. what is pre- processor? Show any two pre-processor directive
with an example.
2. describe use of following graphics functions in brief:
1. initgraph ()
2. getmaxx ()
3. getx ()
4. outexty ()
3. write a program draw on the screen as per following
specification:
1 circle at middle of the screen with radius of 100.
2. polygon with 5 points at any position on the screen.
Download