Académique Documents
Professionnel Documents
Culture Documents
(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’
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. 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