Introduction to Programming CA413 Quiz
16 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Who developed C language?

  • Rasmus Lerdorf
  • James Gosling
  • Dennis Ritchie (correct)
  • Steve Jobs

What is an example of repetition in C?

  • for
  • while
  • do...while
  • All of the above (correct)

The C-preprocessors are specified with which symbol?

  • !
  • # (correct)
  • @
  • $

The switch expression can be which types?

<p>Integer, character, or float (D)</p> Signup and view all the answers

Which operator is used to access the value pointed to by a pointer?

<ul> <li>(D)</li> </ul> Signup and view all the answers

A function which calls itself is called a ___ function.

<p>Recursive Function (C)</p> Signup and view all the answers

Which statement executes at least one time in C?

<p>do...while (A)</p> Signup and view all the answers

What will evaluate the result in integer only?

<p>None of the given (C)</p> Signup and view all the answers

What will be the output of the given C code when i is set to 5?

<p>fivesixseven (D)</p> Signup and view all the answers

Which of the following is not a standard header file in C?

<p>conio.h (C)</p> Signup and view all the answers

What is the correct extension for a C header file?

<p>.h (C)</p> Signup and view all the answers

Which statement about the C programming language is true?

<p>The execution of a program begins with main(). (A)</p> Signup and view all the answers

What are the elements in the array represented by the following code: int arr = {5};?

<p>5,0,0,0,0 (B)</p> Signup and view all the answers

How many keywords are there in the C programming language?

<p>32 (A)</p> Signup and view all the answers

What process is used to compile a C source file?

<p>Compiler (C)</p> Signup and view all the answers

What is the purpose of using a flowchart in programming?

<p>To visually represent algorithms (D)</p> Signup and view all the answers

Flashcards

Developer of C language

Dennis Ritchie developed the C programming language.

C keywords case

C keywords are in lower case letters.

C repetition example

Examples of repetition in C include 'for', 'while', and 'do...while' loops.

C preprocessor symbol

The '#' symbol is used to specify C preprocessors.

Signup and view all the flashcards

Switch expression type

A switch expression can be an integer or a character, but not a float.

Signup and view all the flashcards

Pointer value access

The '*' operator is used to access the value pointed to by a pointer.

Signup and view all the flashcards

Flowchart process symbol

A rounded rectangle represents a process in a flowchart.

Signup and view all the flashcards

Integer result function

Functions like strcmp(), strcpy(), and strcat() might return integer results.

Signup and view all the flashcards

C program execution start point

The execution of a C program begins with the main() function.

Signup and view all the flashcards

Switch statement rule

A switch statement evaluates an expression and matches it with case labels. If a match is found, the code block associated with that case is executed. The default case is executed if no match is found.

Signup and view all the flashcards

Switch case output

When a C program includes switch(i) where i is 5, code flow will reach case 5, execute its print statement, then move to the subsequent case 6, its print statement, before exiting with a break.

Signup and view all the flashcards

C program extension

The filename extension for a C source code file is .c.

Signup and view all the flashcards

C header file extension

C header files have a .h extension.

Signup and view all the flashcards

Array element example

An array initialized with a single value (e.g., int arr = {5};) only initializes that one element effectively. Other elements are automatically initialized to 0.

Signup and view all the flashcards

C language keyword count

The C programming language has 32 keywords.

Signup and view all the flashcards

C program compilation

A C source code file (.c) is converted into an executable file by a compiler.

Signup and view all the flashcards

Study Notes

Introduction to Programming [CA413]

  • Exam Date and Time: January 24, 2024 (1:15 PM - 4:30 PM)
  • Exam Duration: 195 minutes
  • Section 1 Duration: 40 minutes
  • Total Marks: 70

Section I

  • Question 1: Who developed C language?

    • Dennis Ritchie
  • Question 2: All keywords in C are in what case?

    • Lower Case letters
  • Question 3: What is an example of repetition in C?

    • for, while, do...while
  • Question 4: The C-preprocessors are specified with what symbol?

    • #
  • Question 5: scanf() is a predefined function in which header file?

    • stdio.h
  • Question 6: What will be the final value of x in the following C code?

    #include <stdio.h>
    void main()
    {
        int x = 5*9/3 + 9;
        printf("%d",x);
    }
    
    • 24
  • Question 7: The switch expression can be integer, character or float only.

    • False
  • Question 8: Which operator is used to access the value pointed to by a pointer?

    • ->
  • Question 9: What symbol is used to represent the process in a flowchart?

    • Parallelogram
  • Question 10: Which function evaluates the result in integer only?

    • strcmp()
  • Question 11: A function that calls itself is called a

    • Recursive Function
  • Question 12: Which statement executes at least once?

    • do...while
  • Question 13: What is the output of the given switch code?

    • fivesixsevendefault
  • Question 14: Which of the following are not standard header files in C?

  • conio.h

  • Question 15: .c is the extension for the C program source file.

    • True
  • Question 16: The extension of header files in C

    • .h
  • Question 17: The execution of a program begins with main().

    • True
  • Question 18: What are the elements present in the array?

    int arr[5] = {5};
    
    • 5, 0, 0, 0, 0
  • Question 19: How many keywords are there in C language?

    • 32
  • Question 20: The C source file is processed by the

    • Compiler

Section II

  • Detailed questions and instructions for the rest of the exam.
  • Includes programming tasks related to flowcharts, switch statements, loops, structure of C programs, file types, identifiers, and numerical computation using arrays.

Section III

  • Detailed questions and instructions for further programming tasks.
  • Including array declarations, function calls, operators and programming logic for specific calculations.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Description

Prepare for the Introduction to Programming CA413 exam with this comprehensive quiz. Covering essential concepts of the C programming language, it includes questions on keywords, preprocessor directives, and basic syntax. Test your knowledge and boost your confidence ahead of the exam on January 24, 2024.

More Like This

Use Quizgecko on...
Browser
Browser