CCP Mock Paper

download CCP Mock Paper

of 3

Transcript of CCP Mock Paper

  • 8/2/2019 CCP Mock Paper

    1/3

    COMPUTER CONCEPTS AND PROGRAMMING IN C

    THEORY

    1. Define a Digital Computer. Draw a neat block diagram for so explaining all itsfunctional units.

    2. What is the difference between digital and analog computer? Explain with suitableexamples.

    3. Define memory unit and its types. Differentiate between RAM & ROM.4. What is an Operating System? Give the classifications of OS.5. Explain the various data types in C giving suitable examples of each. Also give the

    classification of operators in C.

    6. What do you understand by the term Algorithm?7. Explain the various symbols used in a Flowchart.8. What is the difference between algorithm and flowchart?9. What is an operator? What are the various types of operators? Define with examples.10.What do you mean by programming language? What are its classifications? Explain

    the Top-Down development approach.

    11.Differentiate between syntax error and logical error.12.What is the use of header file? Discuss with examples.13.What is the difference between definition and declaration of a variable? Explain with

    example.

    14.What is the scope of variable?15.Explain the use of all conditional statements and program loops available in C.16.Why do we use do-while loop in C? How is it different from while loop?17.What is an array? What are the merits and demerits of array?18.What are pointers? Why are they required? How do you declare and initialize them?19.What is the meaning of prototype of a function? What is the difference between pass

    by value and pass by reference?

    20.What is the purpose of using structure in C? Explain with the help of an example.21.Discuss the different storage classes in C.22.What are the merits and demerits of static and dynamic memory allocation

    techniques?

    NOTE:Im not giving questions from Number System. Do practice all types of

    conversions and ns & (n+1)s complement methods yourself.

    PROGRAMMING, ALGORITHMS & FLOWCHARTS

    A) ALGORITHMS1. Write an algorithm to find the largest of 3 numbers.2. Write an algorithm to sort the list of given integers.B) FOWCHARTS1. Draw a flowchart to find the largest of three integers.2. Draw a flowchart to find whether a number is prime or not.

  • 8/2/2019 CCP Mock Paper

    2/3

    C) PROGRAMS1. Write a program in C to print HELLO INDIA without using any semicolon. 2. Write a program to simulate calculator using switch case statement.3. Write a menu driven program that find out:

    i)

    Whether the entered number is prime or notii) The square root of the entered numberiii) Whether the number is even or odd(Hint: Use Switch-Case for user choice of operation)

    4. Write a program to calculate the sum of digits of a number.5. Write a program to find the reverse of any number and find the whether it is

    palindrome or not.

    6. Write a program in C to take as input a number and print whether it is Armstrong ornot.

    7. Write a program in C to find whether a given number is prime number or not.8. Write a program in C to sequentially search a given integer element from a given list

    of numbers.

    9. Write a program to calculate the sum of Fibonacci series up to 100 terms.10.Write a program to calculate the sum of the following series up to nth term:

    F= x0

    - x2

    + x4

    - x6+

    11.Write a program to find the largest and second largest element of an unsorted array.12.Write a program to describe the use of pointers in printing the value and address of a

    variable.

    13.Write a program to create two matrices A & B of size 3X3 and perform the followingoperations:i) Print the transpose of the matrix Aii) Find the addition matrix C = A+Biii) Find the multiplication matrix D = AXB

    14.Write a program that reads a string from the keyboard and determines whether thestring is palindrome or not.

    15.Write a function to calculate the binary equivalent of a given decimal integer anddisplay it.

    16.Write a function to swap the values of two variables using call by reference method.17.The end semester result of 100 students are tabulated as follows:

    Roll No. Subject 1 Subject2 Subject 3

    .

    .

    .

    Write a program in C using array to read the data and determine the following

    (assume M.M. is 100 for each subject)

    i) Total Marks obtained by each student.ii) The highest marks in each subject and the Roll No. of the student who secured

    it.

    (Hint: use structures)

    18.Create a structure to specify data of a student as below:

  • 8/2/2019 CCP Mock Paper

    3/3

    Roll number, Name, Department, Course, Year of joining.

    Assume that there are not more than 100 students in the college.

    i) Write a function to print the data of a student whose roll number is given.ii) Write a function to print names of all students who joined in a particular year.

    19.Write a program in C to print the following patterns:i) A B C D E F G F E D C B A

    A B C D E F F E D C B A

    A B C D E E D C B A

    A B C D D C B A

    A B C C B A

    A B B A

    A A

    ii) AB A

    A B A

    B A B A

    A B A B A

    iii) 12 1

    3 2 1

    4 3 2 1

    iv) 11 2 1

    1 2 3 2 1

    1 2 3 4 3 2 1