Beruflich Dokumente
Kultur Dokumente
TUTORIAL SHEET - I
Galgotias University
Semester: 1st
Q2. What is an operating system? What are the functions of Operating system?
Q4. What do you mean by an algorithm? What are the criterias on the basis of which an
algorithm is evaluated.
Q5. Write algorithm, source code in C and flow chart for the following
Year: 1st
TUTORIAL SHEET - II
Galgotias University
Q1. What are basic data types in C? What are identifiers and constants?
Q2. Write a program to convert kilometers to meters.
Q3. What are the basic logical operators in C? Explain the function of each.
Q4. Write a program to generate a table of any number.
Q5. What are conditional statements? Explain in detail.
Q6. What is the difference between a while and do-while loop?
Q7. Explain the use of break and continue statement in switch case statement.
Semester: 1st
Year: 1st
Semester: 1st
Year: 1st
TUTORIAL SHEET IV
Galgotias University
Semester: 1st
Q1. What is a function? State advantages to the use of functions. What is the purpose of return statement?
Q2. What do you mean by function prototyping? What is meant by a function call?
Q3. Explain the difference between a function declaration and definition with suitable example.
Q4. What is the purpose of keyword void in function declaration? When will you make a function inline
and why?
Q5. What is recursion? What advantages is there in its use? Explain difference between recursion and
iteration.
Q6. Write a program to generate Fibonacci series using recursion.
Q7. Write a program to add three numbers using a function.
Year: 1st
TUTORIAL SHEET - V
Galgotias University
Semester: 1st
Q1. What is a structure? What are its various advantages? Distinguish between array and structure.
Q2. Explain the general syntax of structures both having one object and array of objects using appropriate
examples.
Q3.What are unions? Differentiate between structure and union.
Q4. What are enumerated data types? Explain their declaration and use in programming.
Q5.Write a program that inputs and displays information of a student.
Q6. Write a program to declare structure as a member of a union and display its contents.
Q7. Can we use a structure within a structure? Give an example to support your answer.
Q18. Which one of the following is a better technique of representing the value of PI. Justify
your answer
#define PI 3.14159
Float pi=3.14159
Year: 1st
TUTORIAL SHEET - VI
Galgotias University
Semester: 1st
Year: 1st
Semester: 1st
1. Distinguish between
a. while & do while statements
b. break and continue statements
c. getchar(), getch(), and getche()
2. Write a program to enter a positive number, and print it as a product of its prime
factors.
3. What are the different types of operators available in C. what do you mean by operator
precedence and why is it important. Explain with a suitable example.
4. What are the different storage classes in C. Briefly Explain them.
5. Write a program to enter a character from the keyboard perform the following
a. The program should test if it is a lower case letter or the upper case letter
b. If it is a lower case letter than convert it into upper case and print it.
c. If it is a upper case letter than convert it into lower case and print it.
d. If it is neither lower nor upper than print such characters without any change.
6. Write a program to enter numbers till the user wants. At the end it should display the
count of positive, negative and zeros entered.
7. Write a program to produce the following output
1
23
456
7 8 9 10
8. Write a program to print the following pattern.
0123456789876543210
012345678 876543210
01234567
76543210
0123456
6543210
012345
543210
01234
43210
0123
3210
012
210
0
0