ccp question bank

Upload: ayesha-shariff

Post on 10-Feb-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/22/2019 CCP Question BANK

    1/5

    CCP Question Bank

    Unit1

    1. Define computer? With a diagram explain the basic structure of a computer in detail.2. Explain the stored program concept.3. List & Explain steps forinformation processing cycle.4. Explain the categorization of computers indetail (data handling technique, computerfor organization, computer for individuals).5. Explain the working of keyboard with neat diagram.6. Explain types of monitor in detail.7. Define Software. Differentiate between System software & Application software?8. Explain Conversion from binary to decimal and decimal to binary with examples?9. List & Explain data scanning devices.(input devices)10.Explain various output devices.11.Explain different types of printers.

    Unit3

    1. Explain the structure of a C program with a neat diagram & a sample program?2. Define constant and explain different types of constants3. Explain coding constant with suitable program.4. Explain formatted output and input ( printf & scanf ) function with proper syntax and

    examples.

    5. With a neat diagram explain the steps ofcreating & running C program in detail?6. What is variable? Explain rules to variable declaration (define).7. What are c tokens? Explain them.8. What is data type? Explain data types available in C.9. Explain different phases of SDLC (system development life cycle).10.Define identifier. List the rules for naming valid identifiers.

    Unit4

    1. Define expression? List the 7 different expressions in C.2. Explain primary, binary, and assignment expression?3. Explain the postfix and prefixexpressions with examples4. What is type conversion? Explain implicit and explicit type conversion with suitable

    program.

    5. Explain precedence and associativity with suitable examples?6. Explain steps for evaluating an expression(with & without side effect)7. Define side effect. Evaluate the following exp. Assume initial values x=2, y=4, c=6

    i) x+=x--+y++*++z ii) x*(3+y)/2-z*y iii) x+=x--+--x

    After evaluating this exp the value of x, y, z is? (Solve more examples)

    8. Write a program to convert temperature from Fahrenheit to Celsius & Celsius toFahrenheit.

    9. Write program to convert degree to radian and radian to degree?10.Write a program to find a) area of triangle using 3 sides b) area of circle c) area of

    rectangle OR write this program using switch.

  • 7/22/2019 CCP Question BANK

    2/5

    CCP Question Bank

    11.Write the following programs:1. Find right most digit.2. Print quotient and remainder.3. Fibonacci series.4. Calculator program (add, sub, mul, div).5. Sum of N natural nos.

    Unit 5

    1. Define function? Explain function in C with advantages.2. Explain the elements of user defined function with the help of finding square of a given

    number program. OR (how function name is used in 3 ways)3. Explain parameter passing technique (inter function communication) with the help of

    swapping two given integer numbers program.

    4. Explain function with parameter, function without parameter, & with return value5. List and explain the prototype statements ofLibrary functions for mathematical

    manipulation.6. Explain general library functions(rand(), srand())7. Write the following programs using function:

    1. Find GCD & LCM.2. Find right most digit (LSB: least significant digit ).3. Print quotient and remainder.4. Fibonacci series.5. Find area of circle, tri-angle, rect-angle.6. Calculator program(add, sub, mul, div)7. Swap 2 nos with out using temp variable.

    Unit 6

    1. Explain logical & relational operators?2. Explain two way selection (if..Else) with rules and write simple program ?3. Explain loops in c with suitable flow chart and syntax.(for, while, do.. while)4. Write a c program to find factorial of a given number using (for, while, do.. while).5. Explain a recursive function. list rules for designing recursive function

    1) to find factorial of a given number.

    2) to generate Fibonacci series.

    3) tower of Hanoi

    6. Define dangling else problem & explain multi-way selection (switch/else if ladder)with syntax, flowchart

    7. Explain pretest and posttest loops in c with suitable flow chart and syntax.8. Difference between while & do while.9. Explainjump statements (break and continue).10.Explain conditional operator, bitwise operator.11.List the different decision making statements and explain any two with syntax and

    flow chart. (two-way selection , multi-way selection(switch/else if ladder) )

    12.Using switch writeprogram to print day of the week assume day1 as Monday.13.Write program to find area of triangle, circle, & rectangle using switch.

  • 7/22/2019 CCP Question BANK

    3/5

    CCP Question Bank

    14.Write a program to print gradeby using i) switch ii) else if ladder15.Write program:

    1) Given no. is palindrome2) Given number is even or add3) Biggest of 2 no. , biggest of 3 no.4) Given year is leap year or not

    Unit 71. Define array? Explain one dimensional array in C in detail.2. Explain 2D and multi dimensional arrays in C in detail.3. Write a binary search program to find target element.4. Write a program to sort array elements using bubble sort algorithm.5. Explain inter function communication with respect to 1D and 2D array(passing array as

    a parameter)

    6. Explain about the string delimiter and write a C program to read and print your name.7. Define string. Explain string classification.8. Explain the string unformatted input and output functions.9. Explain C strings? Explain string manipulation functions (built in functions).10.Write a program to check whether given string is palindrome or not.11.Write a C program to read & print N array elements.

    Unit1

    1.

    a)Output of the linker is called___________fileA) .c B) .obj C) .h D) .exe

    2. a) write a C scanfstatement to read and store the following data in variables

    Section rollno result

    3. a) Find errors:

    #includInt mian();

    {

    a int;

    printf(enter the value);getch()

    }.

    4. a) Write a printf statement to print the following : printf(%%d\n,25.0);

    Unit3

    5. a) Identify the invalid character constant:

    a)c b) c c)1 d)h

    D 65 70.50

  • 7/22/2019 CCP Question BANK

    4/5

    CCP Question Bank

    6. a)List the Software development life cycle phases.

    7. a) ____________ is the Fastest Computer in the world.

    8. a) List any 3 rules to select identifiers in the programs.

    Unit4

    2. a)__________ is used to determine the order in which different operations in anExpression is evaluated.

    A) Statement B) evaluate C) precedence D) Associatively

    2. a) List the 7 different expressions in C.

    3. a) which of the following is not a unary expression.

    a) ++x b) -x c) -5 d) x=4

    4. a) Area=R2+2Rh its equivalent C expression is_________________

    Unit 5

    5. a) Variables inside a parenthesis of a function declaration have ______level access

    a) Local b) global c) module d) universal

    6. a) a variable defined in a function called is ________________a) Actual variable b) formal variable c) local variable d) global variable

    7. a) A function that calls itself is known as_________________

    a) Nested function b) inline function c) overloaded function d) recursive function

    b) i) List the prototype statements of Library functions for mathematical manipulation.

    ii) write the formulaiia) to generate random numbers between 0 to 675iib) to generate random numbers between 675 to 775

    8. a) why we need to write preprocessor directives at the top of our program.

    Unit 6

    1.A) multiway selection can be implemented by using___________a) for b)while c)if else d)switch

    A) The expression value in switch statement should be___________________

    a) float b) int c) char d) double3. A) for(i=1;i

  • 7/22/2019 CCP Question BANK

    5/5

    CCP Question Bank

    4. A) while(0){

    printf(it is not end of CCP );

    }

    a) 0 b) 1 c) infinite d) finiteUnit 7

    5. A)______is an integral value used to to access elements of an arraya) constant b) index c) element d) variable

    6. A) number of elements in an array defined by a[3][4] is ______

    a) 34 b) 43 c)12 d)21

    7. A) a function is used to concatenate two strings is_____________

    a) strcpy b) strlen c) strrev d) strcat

    8. A) Evaluate the expression 10!=10||5