Pps Class Test 2_1

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Vijayetha
V
Vijayetha
Community Contributor
Quizzes Created: 1 | Total Attempts: 135
| Attempts: 135
SettingsSettings
Please wait...
  • 1/10 Questions

    Write a program on recursion

Please wait...
About This Quiz

This test evaluates understanding of basic programming concepts including structures, function prototypes, recursion, and array operations in a programming context.

Pps Class Test 2_1 - Quiz

Quiz Preview

  • 2. 

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

  • 3. 

    • 50

    • 4

    • 15

    • 69

    Correct Answer
    A. 50
  • 4. 

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

    • 50

    • 4

    • 15

    • 69

    Correct Answer
    A. 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. 

    • Hello

    • H

    • Error

    • Hell

    Correct Answer
    A. Hello
  • 6. 

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

    • Function prototype

    • Function call

    • Function definition

    • 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 

    • Calling a function again and again till base condition is met

    • Calling a function

    • Calling a block of code

    • 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. 

    • 30

    • 10

    • 20

    • Error

    Correct Answer
    A. 20
  • 9. 

    • 10

    • 20

    • 30

    • Error

    Correct Answer
    A. Error
  • 10. 

    • Garbage values

    • Error

    • 11 12 13 14 15 16 Garbage values

    • Garbage values

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

Quiz Review Timeline (Updated): Mar 21, 2023 +

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.