C Language Basic Quiz Test!

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Heerendra
H
Heerendra
Community Contributor
Quizzes Created: 1 | Total Attempts: 1,826
Questions: 5 | Attempts: 1,826

SettingsSettingsSettings
Programming Language Quizzes & Trivia

C language


Questions and Answers
  • 1. 

    C language developed on pdp11 computer in bell laboratory?

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    The statement is true. C language was indeed developed on the PDP-11 computer at Bell Laboratories. The language was created by Dennis Ritchie in the early 1970s as a successor to the B programming language. The PDP-11 computer was a popular machine at that time, and its hardware architecture heavily influenced the design of the C language.

    Rate this question:

  • 2. 

    C language has 4 data types?

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    The statement "c language has 4 data types" is incorrect. C language actually has several data types, including int, float, char, double, and more. Therefore, the correct answer is false.

    Rate this question:

  • 3. 

    Pointer has how many special characters?

    • A.

      One

    • B.

      Two

    • C.

      Three

    • D.

      Four

    Correct Answer
    B. Two
    Explanation
    The correct answer is "two" because a pointer can have two special characters, which are the asterisk (*) and the ampersand (&). The asterisk is used to declare a pointer variable and to dereference a pointer, while the ampersand is used to get the address of a variable.

    Rate this question:

  • 4. 

    Ternary opretor is subsitute of?

    • A.

      Switchcase

    • B.

      If..else

    • C.

      Do..while

    • D.

      While

    Correct Answer
    B. If..else
    Explanation
    The correct answer is if..else. The ternary operator can be used as a substitute for an if..else statement in certain cases. It provides a concise way to write conditional statements and allows for a more compact code. The syntax of the ternary operator is "condition ? expression1 : expression2", where the condition is evaluated and if true, expression1 is executed, otherwise expression2 is executed. This makes it a suitable alternative to if..else statements when there are simple conditional checks that need to be made.

    Rate this question:

  • 5. 

    What's wrong in this:for(;;)

    • A.

      Infiniteloop

    • B.

      Compile error

    • C.

      Warrning

    • D.

      None of above

    Correct Answer
    A. Infiniteloop
    Explanation
    The given code "for(;;)" is a shorthand way of writing an infinite loop. In this case, there are no conditions specified in the loop, so it will continue indefinitely. Therefore, the correct answer is "infiniteloop".

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jan 28, 2010
    Quiz Created by
    Heerendra
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.