C Programming


Q1. What is the basic difference between DVORAK and QWERTY pattern of keyboards? Explain in the context of current market usage.

Q2. Differentiate between compiler and interpreter

Q3. What do you understand by output device? Explain printer and printing mechanism of character by dot matrix.

Q4. With the help of a ‘C’ program define call by value and call by reference.

Q5. What are the different storage classes available in ‘c’? Explain any one of them.

Q6. What is operator? Define conditional operator with a C program.

Q7. Write a function that receives 5 integers and returns the sum and the average of these numbers. Call this function from main () and print the results in main ().

Q8. Write a c Program to count number of characters, number of blanks, and number of words.


Assignment B

Q1. A 5 digit positive integer is entered through the keyboard, write a function to calculate sum of digits of the 5 digit number

  1. a) Without using recursion b) Using recursion

Q2. Write a recursive function to obtain the first 25 numbers of a Fibonacci sequence. In a Fibonacci sequence the sum of two successive terms gives the third term. Following are the first few terms of the Fibonacci sequence

1          1          2          3          5          8          13         21         34         55         89…..

  • Which of the following statements is true?
    1. C Library functions provide I/O facilities
    2. C inherent I/O facilities
    3. C doesn’t have I/O facilities
    4. Both (a) and (c)
  • Header files in C contain
    1. Compiler commands
    2. Library functions
    3. Header information of C programs
    4. Operators for files


  • Which pair of functions below are used for single character I/O.
    1. Getchar() and putchar()
    2. Scanf() and printf()
    3. Input() and output()
    4. None of these
  • The printf() function retunes which value when an error occurs?
    1. Positive value
    2. Zero
    3. Negative value
    4. None of these
  • Identify the wrong statement
    1. putchar(65)
    2. putchar(‘x’)
    3. putchar(“x”)
    4. putchar(‘\n’)
  • The output of printf(“%u”, -1) is
    • -1
    • minimum int value
    • maxiumint value
    • PC Training Institute Ltd., An ISO-9001 Certified Organisation
  • Error message
  • An Ampersand before the name of a variable denotes
    1. Actual Value
    2. Variable Name
    3. ess
    4. Data Type
  • Symbolic constants can be defined using
    1. # define
    2. const
    3. symbols
    4. None of these
  • Null character is represented by
    1. \n
    2. \0
    3. \o
    4. \e
  • Which header file is essential for using strcmp() function?
    1. h
    2. h
    3. h
    4. h
  • malloc() function used in dynamic allocation is available in which header file?
    1. h
    2. h
    3. h
    4. h
  • File manipulation functions in C are available in which header file?
    1. h
    2. h
    3. h
    4. h
  • C supports how many basic looping constructs
    1. 2
    2. 3
    3. 4
    4. 6


  • A statement differs from expression by terminating with a
We  touch   the   future   ☺  we   teach !
  • ;
  1. :
  2. NULL
  3. .


  • What should be the expression return value for a do-while to terminate
    1. 1
    2. 0
    3. -1
    4. NULL


  • Which among the following is a unconditional control structure
    1. do-while
    2. if-else
    3. goto
    4. for


  • continue statement is used
    1. to go to the next iteration in a loop
    2. come out of a loop
    3. exit and return to the main function
    4. restarts iterations from beginning of loop


  • Which operator in C is called a ternary operator
    1. .then
    2. ++
    3. ?:
    4. ()


  • Which of the following header file is required for strcpy() function?
    1. h
    2. h
    3. h
    4. strcsspy()



  • The meaning of conversion character for data input is
    1. Data item is a long integer
    2. Data item is an unsigned decimal integer
    3. Data item is a short integer
    4. None of the above


  • The conversion characters for data input means that the data item is
    1. An unsigned decimal integer
    2. A short integer
    3. A hexadecimal integer
PC Training Institute Ltd., An ISO-9001 Certified Organisation
  • A string followed by white space


  • Which of the following is a key word is used for a storage class
    1. printf
    2. external
    3. auto
    4. scanf


  • In the C language ‘a’ represents
    1. a digit
    2. an integer
    3. a character
    4. a word


  • The number of the relational operators in the C language is
    1. Four
    2. Six
    3. Three
    4. One



  • A compound statement is a group of statements included between a pair of
    1. double quote
    2. curly braces
    3. parenthesis
    4. a pair of /’s


  • A Link is
    • a compiler
    • an active debugger
    • a C interpreter
    • a analyzing tool in C


  • The continue command cannot be used with
    • for
    • switch
    • do
    • while


  • In C, a Union is
    • memory location
    • memory store
    • memory screen
    • None of these


  • When the main function is called, it is called with the arguments
We  touch   the   future   ☺  we   teach !
  • argc
  • argv
  • None of these
  • both a & b


  • A multidimensional array can be expressed in terms of
    • array of pointers rather than as pointers to a group of contiguous array
    • array without the group of contiguous array
    • data type arrays
    • None of these


  • C allows arrays of greater than two dimensions, who will determined this
    1. programmer
    2. compiler
    3. parameter
    4. None of these


  • A pointer to a pointer in a form of
    1. multiple indirection
    2. a chain of pointers
    3. both a and b
    4. None of these


  • Pointers are of
    1. integer data type
    2. character data type
    3. unsigned integer data types
    4. None of these


  • Maximum number of elements in the array declaration int a[5][8] is
    1. 28
    2. 32
    3. 35
    4. 40


  • If the size of the array is less than the number of initializers then,
    1. Extra values are being ignored
    2. Generates an error message
    3. Size of Array is increased
    4. Size is neglected when values are given


  • Array subscripts in C always start at
    1. -1
    2. 1
    3. 0
    4. Value provided by user
PC Training Institute Ltd., An ISO-9001 Certified Organisation



  • A Structure
    1. can be read as a single entity
    2. cannot be read as a single entity
    3. can be displayed as a single entity
    4. has member variables that cannot be read individually


  • Identify the invalid pointer arithmetic
    1. Addition of float value to a pointer
    2. Comparision of pointers that do not point to the element of the same array
    3. Subtracting an integer from a pointer
    4. Assigning the value 0 to a pointer variable
  • Which is the correct way to declare a pointer?
    1. int_ptr;
    2. int *ptr;
    3. *intptr;
    4. None of these.
  • If you want to exchange two rows in a two dimensional array, the fastest way is to:
    1. Exchange the elements of the 2rows
    2. Exchange the address of each element in the two row]
    3. Silence the address of the rows in an array of pointer and exchange the pointer
    4. None of these.


Contact www.kimsharma.co.in for best and lowest cost solution or
Email: solvedstudymaterial@gmail.com
Call: +91 82907-72200 (Call/WhatsApp) or +91 88003-52777 (WhatsApp Only)


One thought on “C Programming

Leave a Reply

Your email address will not be published. Required fields are marked *