Sie sind auf Seite 1von 8

Year: 1st

TUTORIAL SHEET - I
Galgotias University

Semester: 1st

Q1. Explain the different components of a computer with block diagram.

Q2. What is an operating system? What are the functions of Operating system?

Q3. Differentiate between

a. Compiler and interpreter


b. Assembler and compiler

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

a. Fibonacci sequence, upto nth term.


b. Reversing the digits of an integer
c. Checking whether the given number is a prime number or not
d. Finding the sum of the digits of a number.

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

TUTORIAL SHEET - III


Galgotias University

Year: 1st
Semester: 1st

Q1. What is an array? How it differs from the ordinary variable?


Q2. How are array usually processed in C? Can entire arrays be processed with single instructions,
without using repetition?
Q3. Write a program to check whether the string is palindrome or not.
Q4. What do you mean by two dimensional and multi-dimensional array? Write a program to multiply
two matrices.
Q5. What do you mean by sorting? Explain the types of sorting.
Q6. Write a program to copy one string to another without using library function.

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.

Q8. How to return multiple values from functions?


Q9.When a function is accessed, must the names of the actual arguments agree with the
name of the arguments in the corresponding function declaration?
Q10. What is recursion? What are its disadvantages?
Q11. Name the four storage-class specifications in C? Explain them briefly.
Q12. Differentiate between external and static variable?
Q13. Differentiate between pass by value and pass by Address.
Q14. What do you mean by command line arguments? Explain with an example.
Q15. A 5 digit positive number is entered through the keyboard, write a function to calculate
the sum of the digits of the 5 digit number:
 Without recursion
 With recursion
Q16. Write a recursive function to obtain the frist10 numbers of a Fibonacci series. Where first
few terms of the series are
1 1 2 3 5 8 13 21..
Q17. What is the difference between macros and functions? Explain with an example.

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

1. Write a program to accept a four digit number and display it in words.


(Hint: 456: four hundred fifty six)
2. Write a program for multiplication of two matrices taken as input from the user.
3. Write a program for finding the transpose of an m x n metrics taken as input from the
user.
4. Write a program for bubble sort.
5. Write a program to check whether a given string is a palindrome or not.
6. Write a program to accept a string and ask the user for another string which will be
inserted at a particular location in the first string.
7. Write a program for searching an element using binary search in an integer array.
8. Write a program to perform the following operations on an array.
a) Insert element
i. At beginning of array
ii. Specific location
iii. At the end of the array.
b) Search and replace
c) Delete element

Year: 1st

TUTORIAL SHEET - VII


Galgotias University

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

Das könnte Ihnen auch gefallen