Menu bar

Monday, April 21, 2014

CPU QUESTION BANK


Dear students,
                        This post is a question bank prepared on the basis of questions asked in GTU EXAM. The questions are classified according to the chapters and corresponding years of examination.
                       Over the time your syllabus may have changed but you can get an idea about what type of questions can be asked from each chapter.
                       I have already published the unit wise mark weightage given by GTU on the syllabus page (Click here to view). I hope you will utilize this resource effectively and still if you have any doubts feel free to ask me.



Chapter-1 Introduction to computer and programming

JAN-2013

1. Draw the Block diagram of Computer System and explain.
2. Explain the following terms in brief:
Operating System, Compiler, Global Variable, Header Files
3. Explain various symbols used in Flowchart and draw the flowchart for finding
Factorial of a number given by user.

JUN-2012

1. What is software? List the various categories of software and their use.
2. What is flowchart? Draw a flowchart to print first N Fibonacci numbers.
3. Differentiate between compiler and interpreter.

JAN-2011

4. Explain the ‘C’ Development life cycle using flowchart in detail.

JUN-2011

5. Draw a flowchart to count odd numbers and making their total from given N numbers.

DEC-2011

6. What is Algorithm?
7. Explain various symbols used in Flowchart and draw the flowchart for finding
smallest number out of three given numbers.
8. Draw the Block diagram of Computer System and explain.
9. Define: Software, Hardware, Higher level Language, Operating System.

APR-2010

10. Draw a flow chart to find factorial of a given number.

JUN-2010

11. Name the major components of computer and give their function in brief.

NOV-2010

Chapter-2 Fundamentals of ‘C’


JAN-2013

1. Explain the primary data types used in C.
2. Explain various operators used in C language.

JUN-2012

1. Explain the “?:” (ternary) and “sizeof” operators with proper examples.
2. What are the logical operators in C? List and explain them.
3. What do you mean by local and global variables? Give their scope and life time and
compare them.

JAN-2011

4. What are tri-graph characters? How are they useful? Explain any five of them
5. Explain the classification of operators in C in brief.
6. What is type conversion? Explain the type conversions supported by C Language.

JUN-2011

7. Justify, “C is middle level language.

DEC-2011

8. Explain printf() and scanf() giving their syntex.
9. Explain switch…case statement.
10. Explain various operators used in C language.
11. Data types in C.
12. Scope and Lifetime of Variable.
APR-2010
13. Explain implicit type conversion and explicit type conversion withexample.
14. Explain different operators used in C language.

JUN-2010

15. Give the meaning and output of following C statements.
a. x = 1,2,3;
b. a = (b = 4, c = 5, b+c);
c. if( x = 5)
printf(“x is even\”);
else
printf(“x is odd\n”);
16. Provide two major differences between
a. Software and Hardware
b. Flowchart and Algorithm
17. Write an algorithm and draw the flowchart to accept N numbers and count how many
of them where odd and also compute sum of all these odd.
18. Explain the various I/O function with example in C.

NOV-2010

19. Explain in brief the features of C language.
20. Explain logical operator and relational operator used in C language.
21. Draw a flow chart to find the smallest number out of three given numbers
22. Write a program to convert temperature entered by user from Fahrenheit into Celsius.
23. Explain the different data types of C language.

Chapter-3 Control Structures in ‘C’


JAN-2013

1. Explain switch…case statement with brief example.
2. Explain the difference between while and do..while statement.
3. Write a program to display following pattern using nested for loops.
1
1 3
1 3 5
1 3 5 7
For n lines.
4. Write a C program to check whether the given number is Prime or not.
5. Write short notes on following:
(i) Nested if..else statement.
(ii) Use of break and continue statement.

JUN-2012

1. Explain the multiple (ladder) if-else with syntax and proper example.
2. Assume that you want to make the sum of 1 to 100. Give the necessary code to
perform the same using (1) For loop (2) While loop (3) Do-while loop.
3. Explain the use of break and continue statement with example.

JAN-2011

4. Write the basic differences between the while loop and do-while loop with suitable
example.

JUN-2011

5. How can you define infinite loop using while?
6. What is looping? Explain different types of loops in C and compare them.
7. Show how to sum 1 to 10 using each of these loops.

DEC-2011

8. Write a program in C to generate Fibonacci series like following:
9. 1, 1, 2, 3, 5, 8, 13 …
10. Generate 20 such numbers.
11. Write a program to display following pattern using nested for loops.
* * * *
* * *
* *
*

APR-2010

12. Write a program to accept three number from user and print maximum number.
13. Explain if…else if ..ladder with flowchart.
14. Explain for loop. Differentiate use of continue, break and go to statement.
15. Write a program to print following pattern using loop statement for n row.
1
1 3
1 3 5
1 3 5 7
16. Explain operator precedence and associativity.

JUN-2010

17. What is infinite loop in C? How can you create it? Give an example of situation where
you need to use infinite loop?
18. Write a C program to display the following triangle for N lines.
1
A B
1 2 3
A B C D
1 2 3 4 5
19. Write a C program to display the following triangle for N lines.
1
A B
2 3 4
C D E F
5 6 7 8 9

NOV-2010

20. Explain “if …else…if” ladder of C with neat diagram and a brief program code
21. Compare for loop and while loop with illustration.
22. Write a program to generate Fibonacci series of numbers (total 20 numbers)
23. Write a C Program to check whether the given number is prime or not.

Chapter-4 Array & String


JAN-2013

1. What is String? Explain any four string handling functions in C.
2. Write a C program to read 10 numbers from user and store them in an Array.
Display Sum, Minimum and Average of the numbers.
3. Write a C program to Multiply two 3 X 3 Matrix. Read Two matrices from the user.

JUN-2012

1. Write a program to find the minimum value from the array of 3x3
2. Write a program which accepts a long string and print only characters at positions
which are multiple of 3.

JAN-2011

3. Explain the storage class specifiers in C.
4. Explain getchar() and gets() functions with suitable example.
5. Explain putchar() and puts() functions with suitable example.
6. List the advantages and limitations of Array in C.

JUN-2011

7. Define an array of 10 integer pointers.
8. Write a C program to accept a string and print every third character from string only if
it is lower case.
9. Define an array of structure with integer, string and float as members. Size of array is

APR-2010

10. Write a program to find maximum element from 3 × 3 metrics.

DEC-2011

11. Explain how string is defined in C. Write user defined functions for the following:
(i) strlen() : to find length of string.
(ii) strcat() : to concate two strings.
12. Write a C program to Add two 3 X 3 Matrix.
13. Write a C program to read 10 numbers from user and find Sum, Maximum
and Average of them.

APR-2010

14. Write a program which declares array of 10 integers, enter the data and small the
elements which are even. Also find the maximum number from them.
15. Explain strcat( ), strcpy( ) ,strncmp( ) and strstr( ) string manipulation function.
JUN-2010
16. Write a C program to reverse a string given from keyboard. Don’t use library function
to reverse it.
17. Write a C program to accept array of N integers and find the largest odd number as
well as largest even number and display them.
18. What is a string? How string is stored in C? Give the various functions with their use
for string processing.
NOV-2010
19. Write a program to store 10 numbers in an array. Then find out Sum, Maximum
andAverage of these 10 numbers.
20. Explain following string manipulation functions.
strcmp(), strlen(), strcat(), strstr() ;

Chapter-5 Functions

JAN-2013

1. Write a short note on Categories of Functions.

JUN-2012

1. What is function? Explain the function definition, function prototype and function call
with example.
2. What is call by value? Clear it with example.
3. Write a function which accepts a string and returns the length of the string.

JAN-2011

4. Write a C program in which a 5 digit positive integer is entered throughkeyboard;
write a function to calculate the sum of digits of the 5 digit numberwith using
recursion.
5. Explain the various types of function calls in C.

JUN-2011

6. Give a prototype of function accepting an integer pointer and a float as arguments and
returns nothing.
7. Write a C function to exchange two numbers and use it to reverse an arrayof 10
integers accepted from user.

DEC-2011

8. What is recursion? Explain it with suitable example.
9. What is used defined function? Explain types of functions with example.

APR-2010

10. Write a function which receives number as argument and return sum of digit of that
number.
11. Which are various categories of functions? Explain any one with example.

JUN-2010

NOV-2010

12. List out the categories of functions of C. Explain any one category with example.

Chapter-6 Pointers

JAN-2013

1. What is Pointer in C? Explain its advantages. Also write a function to do swapping of
two elements using pointer. Call this function in main().

JUN-2012

1. What is pointer? Clear it with examples and give its use.
2. Show the use of the malloc() function.

JAN-2011

3. Explain Dynamic Memory Allocation functions with syntax.

JUN-2011

4. Give the meaning of
a. int (*f)(int,int) ;
b. int *f(int,int);
5. How can you allocate memory dynamically for 10 floating point numbers?

DEC-2011

6. Write short note on Pointer.

APR-2010

7. What is dynamic memory allocation? What is difference between malloc and calloc ?
8. What is a pointer? Write a program using pointer to read in an array of integers and
print its elements in reverse order.

JUN-2010

9. Explain the following with proper syntax and examples.
10. Pointers in C 2. Call by value Vs. Call by reference

NOV-2010

11. What is pointer? Give its benefits. Write a program to do swapping of two
elements using function with two pointers as arguments.

Chapter-7 Structure and Union

JAN-2013

1. What is structure in C? Define a structure named “Student” with roll_no, name and
percentage as members. Read data of 5 students from user and display them in proper
format.

JUN-2012

12. Define the union.
13. What is structure? Define the structure and explain how to access the structure
members.

JAN-2011

14. Differentiate Structures and Unions with example.
15. Explain the various ways to access the structure members with proper syntaxin C
language.

JUN-2011

16. What is structure? How can we access structure members? Clear use of nested
structure using example. Compare structure with union.

DEC-2011

17. What is structure? Explain with example how to declare a structure and how to initialize it.

APR-2010

18. State difference between Structure and Union.

JUN-2010

NOV-2010

19. State the difference between Structure and Union.
20. What is “structure”? How do we declare and access structure variables?

Chapter-8 File

JAN-2013

1. Write short notes on File Operations in C.

JUN-2012

1. What is file management? List the different file management functions and explain
the various file modes.
2. Write a program to display the contents of a given file.
3. List the various in-built string functions.

JAN-2011

JUN-2011

DEC-2011

4. Write short notes on following.
5. File Operations in C.

APR-2010

JUN-2010

NOV-2010

No comments:

Post a Comment