Sie sind auf Seite 1von 0

Page 1 of 3

Term End Examination - May 2013


Course : CSE101 - Computer Programming and Problem Solving

Slot: B2
Class NBR :

4091

Time : Three Hours

Max.Marks:100

PART A (8 X 5 = 40 Marks)
Answer ALL Questions
1. Give the functionality of Operating Systems with examples.
2. a) What will be the value of c after execution of the program?
#include<stdio.h>
#include<conio.h>
main()
{
int a,b,c;
a=99;
b=100;
c=(b<a || b>a);
printf(%d,c);
}
[2]
b) What will be the output of the following program?
#include<stdio.h>
#include<conio.h>
main()
{
char x=H;
switch(x)
{
case H: printf(%c,H);
case E: printf(%c,E);
case L: printf(%c,L);
case l: printf(%c,L);
case O: printf(%c,O);
}
}
[3]
Page 2 of 3

3. Write an algorithm for the problem given below
Prepare the bill of internet browsing. The Conditions are given below:
<=1 Hour Rs.20 per Hour
2-5 Hours Rs.15 per Hour
>5Hours - Rs.10 per Hour

4. Write a C program to find the number in between 7 to 100 which is exactly divisible by
4 and if divided by 5 and 6 remainder obtained should be 4.

5. Write a C program to input five numbers through the keyboard. Compute and display
product of odd numbers and sum of even numbers.

6. Write a C program to detect the occurrence of a character in a given string.
7. Illustrate the concept of call by value with an example.
8. Explain nested structure with a suitable example.
PART B (6 X 10 = 60 Marks)
Answer any SIX Questions

9. a) Design an algorithm for reversing the digits of an integer
b) Write a C program to convert given decimal number into binary number.
(Eg 10
10
-1010
2
)

10. Write a C program to display the series given below
*
* *
* * *
* * * *
* * * * *
* * * * *
* * * *
* * *
* *
*

11. Write a C program to enter integer number and find the largest and smallest digit of the
number.

12. Write a C program to perform matrix multiplication.
13. a) Write a C program to find the length of characters in a given string including and
excluding spaces.
[5]
b) Write a C program to arrange the numbers in ascending order. [5]
Page 3 of 3
14. Write a C program to enter a character through keyboard. Recognize the entered
character as vowel, constant or symbol. Use switch-case structure to print the
appropriate message.

15. a) Implement a C program to calculate square of a number using user defined function. [5]
b) Write a C program to find the factorial of the given number using recursion. [5]
16. Write a C program to define the structure containing the details of the employee. The
structure may contain first, middle, last name, place, city and pin code. Search the
employee details by first name.

Das könnte Ihnen auch gefallen