Unit I-Introduction Part-A 1. Define Computers? 2. Define An Analog and A Digital Computer.

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

QUESTION BANK GE6151- COMPUTER PROGRAMMING

UNIT I- INTRODUCTION

PART-A
1. Define computers?
2. Define an analog and a digital computer..
3.What are the characteristics of computers?
4.How will you classify computer systems?
5.Expand ENIVAC, ABC, EDVAC, EDSAC and UNIVAC.
6. List the examples and drawbacks of all the generations of computer.
7. What is an expert system?
8. Define micro computers.
9. Give two examples of micro computers.
10. List three categories of micro computers.
11. What are the advantages of laptop computers?
12. Define Mini computers.
13. Define super computers.
14. Define dumb terminal and intelligent terminal.
15. Highlight the difference between micro computer, minicomputer, mainframe and super
16. What is hardware?
17. Define software and data, hardware.
18. List and explain the components of computer hardware.
19. List the main functions of CPU
20. Explain the input-Process - Output cycle (or) working of a computer.
21. What are registers?
22. List five important register and also state the purpose of each register.
23. Define word size.
24. “This is 64-bit processor”. Explain its meaning.
25. Differentiate algorithm, pseudo code and flowchart.
26. What is need for flowchart symbol?
27. Write some rules for drawing a flowchart.
28. What are the rules for writing pseudo code?
29. Write any two advantages of pseudo code.
30. Write any two disadvantages of flowchart.
31. List the bases and the permissible digits in various number systems
32. Determine the decimal equivalent of (B14)16

S.KAVITHA / AP / CSE / MSAJCE Page 1 of 10


QUESTION BANK GE6151- COMPUTER PROGRAMMING

33. Determine the octal equivalent of (010111)2


34. Determine the decimal equivalent of (750)8
35. Write the binary and octal equivalent of hexadecimal number 7BD? (APR2009)
36. Convert binary number 100110 into its octal equivalent? (JAN2009)
37. What are registers?
38. Differentiate analog and digital computers? (JAN2010)
39. Find the decimal equivalent of hexadecimal number 4D.C8 (JAN2010)
40. Convert hexadecimal number into binary equivalent of EBC (JAN2010)
41. What is the significance of base of a number?
42. Explain the significance of face value and position value of a number. Give example.
43. State the meaning for the following flowchart symbols.
4 44. How many characters can be represented in the following codes?
4 45. What is a number system? List the categories of number system.
4 46. What are the types of number system?
47. Convert the following decimal numbers into binary octal and hexadecimal.
48. Convert the following binary numbers into decimal numbers.
49. Convert the following octal into decimal numbers.
50. Convert the following hexadecimal into decimal numbers.

PART-B

1. Define computer. Explain the characteristics briefly?


2. Differentiate various generations with features?
3. Explain the classification of computers?
4. Draw a block diagram of computer and explain the different component of a computer system.
5. Explain the functions of ALU, control unit and registers in detail.
6. Discuss important features of various generation of computer system. Give some examples of computers for
each generation.
7. Convert the following numbers into their binary equivalent:
i. (FAC)16, (561)
Convert the following numbers into their decimal equivalent:
ii. (101.01) 2, (245.14) 8
8.Write the algorithm,draw the flowchart,and write pseudocode for the following:
 To find the sum of square root of any three numbers.
 To find the sum of first 100 integers.
 To find the sum of all odd numbers till 100.

S.KAVITHA / AP / CSE / MSAJCE Page 2 of 10


QUESTION BANK GE6151- COMPUTER PROGRAMMING

 To find the sum of any five integers.


 To find the factorial of number n.
 To find the first n numbers in a fibonacci series.
 To find the sum of digits of a number
 To find whether a number is prime or not.
 To convert temperature from farenheit to celsius.

UNIT-II- C PROGRAMMING BASICS

PART- A

1. Give any four features of „C‟ language.


2. What are the C standards?
3. List down the white space characters.
4. Define Character Set?
5. What are keywords?
6. Define identifiers.
7. Define data types.
8. Classification of data types
9. Write down the different Basic data types with their keywords available in „C‟
10. Which data type is flexible for user to create new data type and define it?
11. In declaration statement what qualifiers and modifiers can be used as optional and define it.
12. Difference between Declaration and Definition.
13. Define Data Object.
14. Define constants? How they differ from variables?.
15. Define and list the types of literals constant.
16. Define and write any two rules to floating point literal constant.
17.Define Comment.
18What are the types of Comments in C and explain it.
19. In body of a function what are the statements are available in C.
20.How do you execute C program and write down the steps.
21.How user defined data types are created.
22.What is meant by „C‟ tokens?
23.Write the use of scanf&printf with example?
24. Define String constants.
25. Differentiate operator and operand?
26. What are the various types of C operators?(Dec/Jan2014)

S.KAVITHA / AP / CSE / MSAJCE Page 3 of 10


QUESTION BANK GE6151- COMPUTER PROGRAMMING

27. What is Ternary operator?


28. Differentiate Simple and Compound expressions.
29. What is precedence and associativity of operators?
30. Mention the three different modes of binary arithmetic operators.
31. What are the important operators in arithmetic operator?
32. Difference between initialization and assignment.
33. Mention the methods that can be used to print strings on screen.
34. Write about jump statements in C language.
35. What is the output of the following?
main()
{
int x=100, y=200;
printf(“%d”,(x>y)?x:y);
}

36.What are the types of I/O statements available in „C‟?


37. Define single characters input getchar() function
38.Define single characters output putchar() function.
39.What is the difference between scanf() and gets() function?
40.Define simple if-statement.
41What is mean by looping?
42What are the differences between if and while statement?
43What the differences are between while and do…while loop? (Jan 2009)
44. What is mean by break statement?
45.Whatis meant by continue statement?
46.If a=50, b=10, and c=20, evaluate the following complex expression.
c + = (a>0 && a < = 10 )? ++a : a / b
47What is type casting?
48What is global variable?
49.What is local variable?
50. What is meant by Enumerated data type.
51. Write a for loop statement to print the numbers from 10 to 1. (Dec/Jan 2014)
52. Write short notes about main ( ) function in ‟C‟ program. (MAY 2009)
53. What is the use of sizeof() operator in C.
54. Why header files are included in „C‟ programming?
55.What is the output of the programs given below?
main()
{

S.KAVITHA / AP / CSE / MSAJCE Page 4 of 10


QUESTION BANK GE6151- COMPUTER PROGRAMMING

float a;
int x=6, y=4;
a=x\y;
printf(“Value of a=%f”, a);
}

PART- B

1. Explain in detail about the structure of C program.


2. Explain about the History of C.
3. Discuss in detail about the various Data types available in C.
4. Describe in detail about the various types of operators.
5. Explain in detail about Formatted Input and output functions.
6. Explain in detail about the Decision making statements.
7. Discuss about the various Looping statements.
8. Explain in detail about C tokens.
9. Write a C program to calculate the average of a set of N numbers using While loop.
10. Write a C program to print the largest of three numbers using If..else.
11. Write a C program to find the root of the quadratic equation.
12. Write a C program to determine whether the given number is odd or even, positive or negative
13. Write a C program to find the factorial of the given number.

UNIT-III- ARRAY AND STRINGS

PART- A
1. Define array.(Dec/Jan 2014)
2. Write the classification of arrays.
3. Define one-dimensional arrays.
4. Write the features of arrays.
5. What is meant by two-dimensional array?
6. Define multi-dimensional array.
7. Write any two important points of arrays in C language.
8. Define strcpy() function.
9. Define string in C language.
10. Write down any two important points of string literal constant.
11. What is the difference between an array and a pointer?
12. Why the terminating null character is very important in C language.
13. Define length of a string in C language

S.KAVITHA / AP / CSE / MSAJCE Page 5 of 10


QUESTION BANK GE6151- COMPUTER PROGRAMMING

14. Why the terminating null character is very important in C language.


15. How a string literal constant “SEC A” is stored in a memory, show a diagrammatic representation.
16. Write the role of strlen() function.
17. How list of strings are are stored in real time application.
18. What are the different ways to print character arrays?
19. How multi-dimensional array are is stored in one dimensional array.
20. What are the limitation of array in C
21. Write a program to convert a string to uppercase
22. List any two string library functions with their role in C language. (Dec/Jan2014)
23. How do you declare an array of strings in C language?
24. What is use of array of strings?
25. Define Searching.
26. Why searching concept is introduced in C language.
27. How searching works in C language.
28. What does system programs extensively search?
29. What are the sorting techniques available in C
30. What is the use of atoi() function?
31. What is the use of „typedef‟‟?
32. Define Heap Sort.
33. Mention the various types of searching techniques in C
34. What is linear search?
35. What is Binary search?
PART B

1. Discuss in detail about string handling function.


2. Write a program to sum of all elements stored in an array.
3. Write a program that would sort a list of names in alphabetical order.
4. Write a program to calculate the sum of the elements of a matrix stored in an array.
5. Write a program to perform multiplication operation of elements of a matrix stored in an array.
6. Write a program to perform transpose of elements of a matrix stored in an array.
7. Explain linear search and binary search with an example.
8. Define sorting and explain any the sorting in detail.

S.KAVITHA / AP / CSE / MSAJCE Page 6 of 10


QUESTION BANK GE6151 / COMPUTER PROGRAMMING

UNIT-4- FUNCTIONS AND POINTERS

PART-A

1. What is a function? What are its advantages? (Dec/Jan2014)


2. What are the differences between function declaration and function definition?
3. What is meant by prototyping function and why it is necessary?
4. „C‟ is strongly typed language? What does it mean?
5. Divide and conquer strategy.
6. What are the two classification of function?

7. Define user-defined functions with example. Is main a library function or a user defined
function?
8. Why do we include header files in the programs and their role?
9. What is meant by the terms actual arguments and formal parameters. Explain with an
example?
10. Can a function have more than one return statement within the body?

11. What is the difference between warning and error?


12. What is function prototype and function designator?
13. What are the two different perspective of function prototype and explain?
14. How a function can be defined. Explain with an example?
15. What are the steps in writing a function in a program?
16. What is the purpose of the function main()?
17. Is it better to use a macro or a function?

18. What is the classification of function?


19. Define Void functions.
20. Explain the use of return statement.
21. Define call by value.
22. Define call by reference.
23. What are the two ways of passing arrays to the function.
24. What is meant by recursion and explain with an example.
25. Write a C program for factorial using recursion function.
26. Differentiate direct and indirect recursion
27. What is the difference between an array and a pointer?
28. What are the patterns of recursive calls and explain it?
29. What is the difference between an array and a pointer?
30. Define pointer. Explain its use with an example.
31. Define address-of operator.
32. What are the advantages of using pointers?

K.THAMARAI SELVI,S.KAVITHA, M.SANGEETHA / AP / CSE / MSAJCEPage 7 of 10


QUESTION BANK GE6151 / COMPUTER PROGRAMMING

33. Define void pointer.


34. .What is pointer to pointer?
35. Define pointer arithmetic
36. What is meant by call by value and call by reference?
37. Write any three comparisons between call by value and call by reference.
38. Explain default argument.
39. Write the output of the following C program.
main( )
{ int v=3;
int *pv;
pv=&v;
printf(“\n *pv=%d v=%d”, *pv,v);
*pv=5;
printf(“\n *pv=%d v=%d”, *pv,v);
}

40. What are the various dynamic memory allocation functions?


41What is the output of the program?
main()
{
int i=5;j=2;
junk(i,j);
printf(“\n %d %d”,i,j);
}
42 What is dangling pointer?

PART B

1. Explain in detail about pass by value and pass by reference with example.
2. Write a program for matrix multiplication.
3. Write a program that would sort a list of names in alphabetical order.
4. Write a C program to calculate standard deviation of an array of values. Use functions to
calculate std. deviation and mean.
5. Write a program for counting words in a text.
6. Define in detail about pointers with example.
7. Write a function using pointers to exchange the values stored in two locations in the
memory.
8. Write a C program for Inventory updating using structure pointers.
9. Explain the categories of functions.

K.THAMARAI SELVI,S.KAVITHA, M.SANGEETHA / AP / CSE / MSAJCEPage 8 of 10


QUESTION BANK GE6151 / COMPUTER PROGRAMMING

UNIT-5- STRUCTURES AND UNION

PART-A
1. Define structure.
2. Differentiate Array from structure.
3.Give the structure definition
4. What are the elements to be included while declaring a structure variable?
5. Mention the advantages of Pointers to structure.
6.Can a structure have a pointer to itself?
7.Mention the two ways of accessing a structure object.
8. List the three ways of passing a structure object to a function.
9.What are anonymous structures.
10. Mention the categories of operations on structure.
11. Enumerate the two ways of accessing a structure object.
12. Give the syntax for dot operator
13. Define union.
14. Give syntax for union.
15. Give any three comparison structure and union. (Dec/Jan2014)
16. How to keep track of which field of a union is in use?
17. How can you access the members of the Union?
18. What are the storage classes available in C?
19. What is meant by storage duration and Lifetime of an object
20.Write the general syntax of a declaration statement.
21. What do you mean by preprocessor directives?
22.List some of the preprocessor directives available in C language. (Dec/Jan2014)
23. Enumerate two types of Macros.
24.What are the various stages a program undergoes before execution?
25.Is it better to use a macro or a function?
26.What is register storage in storage class?
27.What is static storage class?
28. Define Auto storage class in C.
29. Define pre-processor in C.
30. Define Macro in C.
31. What are conditional Inclusions in Preprocessor Directive?
32. What you meant by Source file Inclusion in Preprocessor directive?

K.THAMARAI SELVI,S.KAVITHA, M.SANGEETHA / AP / CSE / MSAJCEPage 9 of 10


QUESTION BANK GE6151 / COMPUTER PROGRAMMING

PART B

1. Explain the concept of structure with suitable example.


2. Explain in detail about unions with suitable example.
3. Write a C program for Inventory updating using structure pointers.
4. Write a C Program a structure which reads „n‟ students information (name,3 subjects
marks)and calculate total marks, result print them in a particular
format.
5. Write a C Program to read data in 3 structures and print.
6.Program a structure which stores information about hotels which stores information
aboutname, grade, room change, no of rooms.
a) Print the hotels of given grade in order of roomchange.
b) Print the hotels with roomchange less than a given change.
7. Write a C Program to accept a string using pointers and functions.
8. What are functions? Explain the types of functions in detail with an example
program for each type.

K.THAMARAI SELVI,S.KAVITHA, M.SANGEETHA / AP / CSE / MSAJCEPage 10 of 10

You might also like