Sie sind auf Seite 1von 8

Tutorial 1

(1) Explain various symbols used in Flowchart and draw the flowchart for finding Factorial of a
number given by user.
(2) Draw a flowchart to count odd numbers and making their total from given N numbers.
(3) Draw the flowchart for finding smallest number out of three given numbers.
(4) Define: Software, Hardware, and Higherlevel Language.
(5) Name the major components of computer and give their function in brief.
(6) Draw the Block diagram of Computer System and explain.
(7) Explain the following terms in brief:
Operating System, Compiler, Global Variable, Header Files
(8) What is software? List the various categories of software and their use.
(9) Differentiate between compiler and interpreter.
Tutorial -2 Fundamentals of ‘C’

1) Draw flowchart of programs 7, 8, and 10 of Practical-2.


2) Explain the various data types used in C.
3) Explain logical operator and relational operator used in C language.
4) Explain the “?:” (ternary) and “sizeof” operators with proper examples.
5) Explain printf() and scanf() giving their syntax.
6) Explain implicit type conversion and explicit type conversion with example.
7) Write an algorithm and draw the flowchart to accept N numbers and count how manyof them
where odd and even and also compute sum, average and mode of all those numbers.
Tutorials no 3

Q1 What are various Decision making statements in c.


Q2 Discuss about if else statement with example.
Q3 What are various Logical Operators ,explain with example
Q4 Write a C program to calculate the salary as per the following table:

Q5 Any year is input through the keyboard. Write a program to determine whether the year is a leap
year or not.
(Hint: Use the % (modulus) operator)
Tutorials no 4
Q 1 What are Arrays.
Q 2 write a program to find average marks obtained by a class of 30 students in a test.
Q 3 What would be the output of the following programs:

main( )
{ int num[26],
temp ; num[0] = 100 ;
num[25] = 200 ;
temp = num[25] ;
num[25] = num[0] ;
num[0] = temp ;
printf ( "\n%d %d", num[0], num[25] ) ; }

(b) main( )
{ int array[26], i ;
for ( i = 0 ; i <= 25 ; i++ )
{
array[i] = 'A' + i ;
printf ( "\n%d %c", array[i], array[i] ) ;
}
Q 4 What are Strings
Q 5 Discuss about strlen( ) and strcpy( ) What is output of following program

main( )
{
char arr[ ] = "Bamboozled" ;
int len1, len2 ;
len1 = xstrlen ( arr ) ;
len2 = xstrlen ( "Humpty Dumpty" ) ;
printf ( "\nstring = %s length = %d", arr, len1 ) ;
printf ( "\nstring = %s length = %d", "Humpty Dumpty", len2 ) ;
}
Chapter-5 Functions

1. What is function? Explain the function definition, function prototype and function call with
example.
2. List out the categories of functions of C. Explain any one category with example.
3. Explain the various types of function calls in C with the help of an example.
4. Describe two ways of passing parameters to functions. When do you prefer to use each of
them?
5. What is recursion? Explain it with suitable example.
6. What is used defined function? Explain types of functions with example.
7. The main() is a user defined function. How does it differ from other user defined functions?
8. What is prototyping? Why is it necessary?
9. Distinguish between the following:
(a) Actual and Formal arguments
(b) Global and Local variables
(c) Automatic and Static variables
(d) Scope and Visibility of variables
(e) & operator and * operator

Chapter-6 Pointers

1. What is pointer? How is pointer initialized? Clear it with examples and give its use and
limitation.
2. Show the use of the malloc() and calloc() function using an example.
3. What is difference between malloc and calloc ?
4. Describe the typical application of pointers in developing programs.
5. Distinguish between:
(a) (*m)[5]
(b) *m[5]
6. How we can assign pointers to array and structure? Explain with example.
Chapter-7 Structure and Union

1. Differentiate Structures and Unions with example.


2. Explain the various ways to access the structure members with proper syntax in C language.
3. What is the meaning of the following terms?
(a) Nested Structures
(b) Array of structures
4. When do we use the following?
(a) Unions
(b) Bit fields
(c) The sizeof operator
Give typical example of each of them.
5. How does a structure differ from an array?
6. Explain the meaning and purpose of the following terms:
(a) Template
(b) The struct keyword
(c) The typedef keyword
(d) Tag name
7. Differentiate between the following:
(a) Structures and Pointers
(b) Structures and Functions
Chapter-8 Dynamic Memory allocation

1. What is dynamic memory allocation? How does it help in building complex programs?
2. How can you allocate memory dynamically for 10 floating point numbers?
3. Discuss the use and limitation of the following functions, explain with example:
(a) malloc
(b) calloc
(c) realloc
(d) free

Chapter-9 File Management

1. Write short notes on File Operations in C.


2. What is file management? List the different file management functions and explain the
various file modes.
3. List the various in-built string functions.
4. Write a program to display the contents of a given file.
5. Disscuss the Difference, use and limitation of the following with some examples:
(a) Getc and getchar
(b) Getc and putc
(c) Printf and fprintf
(d) Foef and ferror