Basics of C Language

Last Updated :
Discuss
Comments

Question 1

Which of the following was the first informal standard of C?

  • A

    K & R C

  • B

    C99

  • C

    ANSI C

  • D

    C11

Question 2

Which of the following best describes C language:

  • A

    C is a low level language

  • B

    C is a high level language with features that support low level programming

  • C

    C is a high level language

  • D

    C is a very high level language

Question 3

Why do statically typed languages like C generally perform better than dynamically typed languages like Python?

  • A

    Type is decided at compile time, reducing runtime overhead.

  • B

    They allocate memory at runtime dynamically.

  • C

    They use an interpreter instead of a compiler.

  • D

    They allow implicit data type conversion.

Question 4

The number of tokens in the following C statement is

printf("HELLO WORLD");
  • A

    3

  • B

    5

  • C

    9

  • D

    8

Question 5

The C language is:

  • A

    A context free language.

  • B

    A context sensitive language.

  • C

    A regular language.

  • D

    Parsable fully only by a Turing machine.

Question 6

Which of the following is a real-world application of C?

  • A

    Web development with HTML

  • B

    Operating system development

  • C

    UI design

  • D

    Spreadsheet analysis

Question 7

What is the purpose of the main() function in a C program?

  • A

    To define variables

  • B

    To serve as the entry point of the program

  • C

    To handle file operations

  • D

    To manage memory allocation

Question 8

Which line is essential in a "Hello, World!" program to print output?

  • A

    printf("Hello, World!");

  • B

    cout << "Hello, World!";

  • C

    print("Hello, World!")

  • D

    write("Hello, World!")

Question 9

What does a compiler do in C?

  • A

    Executes the program directly

  • B

    Translates C code into machine code

  • C

    Manages memory allocation

  • D

    Debugs runtime errors

Question 10

What is the role of #include <stdio.h> in a C program?

  • A

    Defines mathematical functions

  • B

    Includes input/output functions

  • C

    Manages memory allocation

  • D

    Handles string operations

Tags:

There are 10 questions to complete.

Take a part in the ongoing discussion