Showing posts with label Question Bank. Show all posts
Showing posts with label Question Bank. Show all posts

Sunday, April 17, 2016

QB-Unit 5

2 MARKS

1.      What is void pointer? How is it different from other pointers?
2.      Define double pointer with example.
3.      What is the full form and significance of EOF?
4.      Distinguish between #ifdef and #if directives.

5 MARKS

1.      What is the difference between call by value and call by reference? Write a program to swap two floating point numbers using call by reference method.
2.      What is a pointer? What are they required? With reference to pointer define the work of & operator? Write a program in ‘C’ using pointers to swap two numbers.
3.      Write a program to print out our array using the array notation and by dereferencing pointer.
4.      Explain with example defining and calling macros and conditional compilation.
5.      Write a simple C program to show the use of string handling functions.
6.      Describe the use and limitations of the functions getc() and putc(). Write a program in ‘C’ to read data from the keyboard, write it to a file called INPUT, again read the same data from INPUT file, and display it on the screen.
7.      What is a string? Write a program in ‘C’ that allows the user to enter a string and perform the following operations on it:
a.       Count number of characters in string
b.      Remove spaces in string
c.       Count number of words in it
8.      Explain the role of the C preprocessor. What is macro and what precautions one should take when using macros with arguments? What are the advantages of using macro definitions in a program? Give one example of using macro in a program.
9.      Write a program in ‘C’ to read data from keyboard, write it to a file named PASCO, again read the same data from the file PASCO and display number of characters, number of vowels and number of lines contained in it on the screen.
10.  Write a program in ‘C’ to create a list of ten elements using dynamic memory allocation and display the sorted list.

QB-Unit 4

2 MARKS

1.      What is an array? Also give its important properties.
2.      Declare and initialize three dimensional array.
3.      What is the need of dynamic memory allocation?
4.      Write output of the following:
printf(“%d”, strcmp(“Quiet”, “Quilt”));
5.      What is meant by the following terms:
a.       Nested structures
b.      Array of structures

5 MARKS

1.      What are subscripts? How are they specified? What restrictions apply to the values that can be assigned to subscripts in “C” language?
2.      Describe structure. Differentiate between structure and array. Define a structure data type called time_struct containing three member’s integer hour, integer minute and integer second. Write a program in ‘C’ that would assign values to the individual members and display the time in the following form:
16:40:52

3.      Write a program in ‘C’ to sort list of 10 integers in an ascending order.
4.      Write a program in ‘C’ to multiply the two matrices of M X N.
5.      What is dynamic memory allocation? How does it help in building complex programs? What is the task of the following memory allocation functions?
a.       malloc
b.      calloc
6.      Write a program in ‘C’ to create a database of fifty students to store personal details such as Roll No., Name and Marks. Print all the details of student whose name is entered by user.
7.      Write the difference between structure and array. Write a program in ‘C’ to find the largest element of a 3X3 matrix.
8.      Define Union. Write a program in C to find the record of a student having maximum marks from the list of 10 records. Each record has roll no, name, class and marks fields.

QB-Unit 3

2 MARKS

1.      What are decision control structures in ‘C’?
2.      Name any two pre-test loops.
3.      What is the difference between while and do-while loop?
4.      How can we use ‘for’ loop when the number of iterations is not known?
5.      What is the difference between break and continue in’C’? Explain taking an example.
6.      What do you understand by modular programming?
7.      What is the need of functions?
8.      What is a function prototype? Why is it required?
9.      What is the difference between formal parameters and actual parameters?
10.  What is the difference between recursion and iteration?

5 MARKS

1.      Describe the types of looping statements in ‘C’ with necessary syntax.
2.      Differentiate between nested if and switch statements in ‘C’ with example.
3.      W.A.P. to design a calculator that can add, subtract multiply and divide any two numbers using switch case.
4.      Write a program in ‘C’ to read an integer number from keyword, add 1 to it if the number read is even, again add 1 to it if the number is less than 20, otherwise keep the number unchanged and print the final result.
5.      Given a number write a program in ‘C’ using while loop to reverse the digits of the number. For example, the number 12345 should be outputted as 54321.
6.      Write a program in ‘C’
a.       To find the largest among given 3 numbers
b.      To find the sum of the digits of a number
c.       To find sum of even and odd numbers from first 100 integers
d.      To find whether a number is prime or not.
e.       To generate 10 Fibonacci numbers
7.      Write a program in ‘C’ to print the following pattern”
1
2    3
4    5          6
7    8          9          10

8.      Discuss the different types of functions used in ‘C’ language.
9.      Write a program in ‘C’ to calculate the area and perimeter of a circle for a given radius using user defined single function which returns area and perimeter to the main function.
10.  What is recursion? Write a C program to find the factorial of a given number using recursion.
11.  Write a program in C to generate Fibonacci series (0  1  1  2  3  5  8….) using recursive function.
12.  What is the difference between ‘call by value’ and ‘call by reference’? explain with an example.

QB-Unit 2

2 MARKS

1.      What do curly braces denote in C? Why does it make sense to use curly braces to surround the body of a function?
2.      State the difference between
#include<filename>  and  #include”filename”

3.      What is a keyword? How is it different from an identifier?
4.      What are the various rules for naming identifiers?
5.      What do you understand by modifiers?
6.      What is an escape sequence? Explain taking an example.
7.      What is a variable? How is it declared?
8.      What is the difference between declaration and initialization of a variable?
9.      Differentiate between local and global variable.
10.  How do you define constants? Explain by taking an example.
11.  What is an expression? Explain arithmetic expression.
12.  Why we use relational operators? Explain various relational operators.
13.  What is the difference between unary operator and binary operator?
14.  What is the difference between logical operator and bitwise operator?
15.  What is importance of increment operator? Differentiate between pre increment and post increment.
16.  What are the various shorthand assignment operators?
17.  Explain associativity and precedence property of an operator.
18.  What is the difference between implicit and explicit type casting?
19.  Find the value of Y (assume Y is integer data type)

Y= 4 * 2 / 4 – 6 / 2 + 3 % 2 * 6 / 2 + 2 > 2 && 4 !=2

20.  Differentiate between getchar and scanf functions. In response to the input statement

         scanf(“%4d%*%d”,&year,&code,&count);
The following data is keyed in 19883745, what values does the computer assign to the variables year, code, count?

5 MARKS

1.      Discuss the fundamental data types available in ‘C’ language, along with its memory utilization, range, format specifier, etc.
2.      What is a storage class? Describe automatic, register, static and external with neat syntax.
3.      Briefly discuss the operators available in the ‘C’ language.
4.      Discuss about the formatted and unformatted input/output functions of ‘C’.
5.      Write a program to find the largest of three numbers using conditional operator.

QB-Unit 1

2 MARKS

1.      What is a digital computer? Discuss its characteristics.
2.      What are the functional units of an electronic computer?
3.      Briefly explain the system unit of the digital computer.
4.      Briefly discuss the memory hierarchy of computer.
5.      On the basis of technology, discuss the classification of computers.
6.      Based on size and capacity how can we classify the computers?
7.      What do you understand by multitasking and multiprocessing?
8.      What is an operating system? What are the primary functions of an operating system?
9.      What is a number system? What do you understand by the base of a number system?
10.  What do you understand by ‘top-down’ approach?
11.  What are algorithms? What are its characteristics?
12.  What is a flowchart? Discuss its advantages and disadvantages.
13.  What are programming languages? Discuss its types.
14.  Explain the concept of linker and loader in ‘C’ programming.
15.  Differentiate between (Each carries 2 marks)
a.       Application and system software
b.      RAM and ROM
c.       Primary memory and Secondary memory
d.      Multitasking and multiprocessing systems
e.       Digital and analog computers
f.       Compiler and interpreter
g.      Hardware and Software.
h.      Linker and Loader
i.        High level and low level languages
j.        Assembly language and Machine Language.

 5 MARKS

1.      What is a digital computer? Draw its block diagram and discuss its components.
2.      Convert the following:
a.       (5214)10 =  (   )16
b.      (5A8.2F) 16 = (  )10
c.       (1011.101)10 =  (  )2
d.      (1011.101)2 = (  )10
e.       (451.25) 10 = (   )8
3.      Perform the following binary arithmetic:
a.       1101011 + 1000111 =
b.      10101 – 10011 =
c.       110 * 101 =
d.      11011 / 101 =
4.      Convert the following
a.       (22.17)4  =  (    )8
b.      ( 1234)5  =   (   )7
c.       1’s and 2’s complement of (27)10
d.      1’s and 2’s complement of (111111)2
5.      Write an algorithm and draw a flowchart of the following: (Each carries 5 marks)
a.       To calculate the simple and compound interest
b.      To find the largest (or smallest) among three numbers
c.       To swap two numbers using a third variable
d.      To swap two numbers without using a third variable
e.       To find whether a number is even or odd
f.       To find whether the given year is leap year or not
g.      To find whether the roots of quadratic equation are real or imaginary
h.      To find the sum of the digits.
i.        To reverse the digits.
j.        To find the sum of first n-numbers
k.      To find the sum of first n-even (or odd) numbers
l.        To calculate the factorial of a number
m.    To check whether the given number is Armstrong or not
n.      To find whether  a number is prime or not
o.      To print the Fibonacci series up to N number.
6.      Describe the generations of computer based on the (i) Hardware (ii) Software (iii) Computing characteristics (iv) Physical appearance and (v) Applications.
7.      What is DOS? Discuss atleast 5 internal and 5 external commands of DOS.
8.      Explain at least five feature of windows operating system
9.      Discuss the architecture of LINUX
10.  What is Android? What are its advantages?
11.  Draw a comparison between Windows and Android.