C Programming - Theory Q|A

  1. Differentiate between variable and constant with examples.
    Answer: T
  2. List any four rules for variable naming.
    Answer: T
  3. What is the purpose of variable declaration?
    Answer: T
  4. List any two header file of C Programming.
    Answer: T
  5. What is the function of printf and scanf?
    Answer: T
  6. Define statement. Briefly explain the simple and compound statements with their examples.
    Answer: T
  7.  Define data type in C Programming. List the data types used in C Programming with brief description.
    Answer: The fundamental unit of C programming mainly used to define the type and nature of data such that compiler detects and proceeds is called data type in C.
    The primary data types of C are listed is following table.

    SN Data Type Keyword Type Specifier
    1 Decimal Integer(Whole numbers ONLY) int %d
    2 Single Precision of 6 digits decimal points
    (Fractional Number)
    float %f
    3 Single Character char %c
    4 String [Collection of Characters] char v_name[size]; %s
  8. What is operator in C? Make list of arithmetic operator with their meaning and examples.
    Answer: The symbols, which are used to computer values based on mathematical calculations , and test multiple conditions is called operators. 
  9. Make list of Relational operator with their meaning and examples.
    Answer: T
  10. Make list of Logical operator with their meaning with examples.
    Answer: T
  11. Define assignment operator with examples.
    Answer: T
  12. Define unary operator. List the four forms of unary operator with their brief description.
    Answer: T
  13. Define ternary operator with syntax and one example.
    Answer: T
  14. Define Comma Operator with example.
    Answer: T
  15. Define size of operator with example.
    Answer: T
  16. Make a table showing the precedence and associativity of C operators.
    Answer: T
  17. Define expressions. Convert following algebraic expression into C expression.
    Answer: T
  18.  Define type conversion in C. Explain Implicit and Explicit type conversion with examples.
    Answer: T
  19. Define Library function. Make a table of some common library function of C  with their meanings.
    Answer: T
  20. Differentiate between printf() and scanf() along with their syntax and examples.
    Answer: T