Pps Class Test 2_1

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 Vijayetha
V
Vijayetha
Community Contributor
Quizzes Created: 1 | Total Attempts: 125
Questions: 10 | Attempts: 125

SettingsSettingsSettings
Pps Class Test 2_1 - Quiz


Questions and Answers
  • 1. 

    Write a program on recursion

  • 2. 

    WRITE A PROGRAM TO READ AN ARRAY OF 5 ELEMENTS AND PRINT SUM OF ALL EVEN NUMBERS FROM THE ARRAY

  • 3. 

    • A.

      50

    • B.

      4

    • C.

      15

    • D.

      69

    Correct Answer
    A. 50
  • 4. 

    Size of the following structure structure student { char name[50]; int id; char subject[15]; };

    • A.

      50

    • B.

      4

    • C.

      15

    • D.

      69

    Correct Answer
    D. 69
    Explanation
    The size of the structure "student" is 69 bytes. This is because the structure contains three variables: "name" which is an array of characters with a size of 50 bytes, "id" which is an integer with a size of 4 bytes, and "subject" which is an array of characters with a size of 15 bytes. Therefore, the total size of the structure is 50 + 4 + 15 = 69 bytes.

    Rate this question:

  • 5. 

    • A.

      Hello

    • B.

      H

    • C.

      Error

    • D.

      Hell

    Correct Answer
    A. Hello
  • 6. 

    What is the following statement in bold called as? void f1(); void main() {   f1(); }

    • A.

      Function prototype

    • B.

      Function call

    • C.

      Function definition

    • D.

      None of the above

    Correct Answer
    A. Function prototype
    Explanation
    In the given code, the statement in bold "void f1();" is called a function prototype. A function prototype is a declaration of a function that specifies the function's name, return type, and parameters (if any), but does not include the function's body. It allows the compiler to know about the existence of the function before it is actually defined or called. In this case, the function prototype is declaring a function named "f1" which takes no arguments and returns void.

    Rate this question:

  • 7. 

    Recursion is 

    • A.

      Calling a function again and again till base condition is met

    • B.

      Calling a function

    • C.

      Calling a block of code

    • D.

      Recursion cannot be implemented in C

    Correct Answer
    A. Calling a function again and again till base condition is met
    Explanation
    Recursion is the process of calling a function repeatedly until a specific condition, known as the base condition, is met. In this process, the function calls itself, creating a loop-like behavior. This allows for the repetition of a certain block of code without the need for explicit iteration. Recursion is commonly used in programming to solve problems that can be broken down into smaller, similar subproblems.

    Rate this question:

  • 8. 

    • A.

      30

    • B.

      10

    • C.

      20

    • D.

      Error

    Correct Answer
    C. 20
  • 9. 

    • A.

      10

    • B.

      20

    • C.

      30

    • D.

      Error

    Correct Answer
    D. Error
  • 10. 

    • A.

      Garbage values

    • B.

      Error

    • C.

      11 12 13 14 15 16 Garbage values

    • D.

      Garbage values

    Correct Answer
    C. 11 12 13 14 15 16 Garbage values

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
  • Apr 01, 2020
    Quiz Created by
    Vijayetha
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.