C Programming Basics - Functions, Arrays, Loops, ETC.

10 Questions | Total Attempts: 234

SettingsSettingsSettings
C Programming Quizzes & Trivia

C programming language is a robust language with a rich set of built in functions and operators that can be used to write any complex program. Take up the C programming basics- functions, array, loops etc. Quiz below and get to understand some basic C programing skills. All the best!


Questions and Answers
  • 1. 
    To declare a header file you use #include headerfile.h
    • A. 

      True

    • B. 

      False

  • 2. 
    The printf function is located in the following header files:
    • A. 

      Stdio.h

    • B. 

      Stdlib.h

    • C. 

      Math.h

    • D. 

      Iostream

    • E. 

      Cmath

    • F. 

      Cstdlib

  • 3. 
    To declare a constant variable you use the following statement:
    • A. 

      Constant

    • B. 

      Cont

    • C. 

      Const

    • D. 

      Conts

    • E. 

      Cos

  • 4. 
    Which is the correct way to declare an array?
    • A. 

      Int a[12];

    • B. 

      A[12] char;

    • C. 

      A[1] int;

    • D. 

      A[int];

  • 5. 
    The following is a correct do while statement: do{ printf("enter a number: "); scanf("%d", &i); } while(i <= 12)
    • A. 

      True

    • B. 

      False

  • 6. 
    Is this correct? #include int main() { int i = 0; int j = 2; if(i < j) printf("i variable is smaller than j variable"); return 0; }
    • A. 

      True

    • B. 

      False

  • 7. 
    The pow function is located in the _______ header file
  • 8. 
    A return statement returns a value to the function from which it is called from
    • A. 

      True

    • B. 

      False

  • 9. 
    C is an Object Oriented Programming Language
    • A. 

      True

    • B. 

      False

  • 10. 
    Learning C is a good way to learn C++
    • A. 

      True

    • B. 

      False

Back to Top Back to top