C Struct and Variable Declaration Quiz
10 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

In the given text, which function returns the width of the rectangle?

  • area(Rectangle rec)
  • width(Rectangle rec) (correct)
  • perimeter(Rectangle rec)
  • length(Rectangle rec)
  • What is the purpose of the 'scores' array in the structure Student?

  • To store student names
  • To store student test scores (correct)
  • To store student ages
  • To store student tuition fees
  • Which of the following is an example of an array of structures in the text?

  • idnumber name age tuitionfee scores 103 John Son 19 14506.25 8 8 7 9 9
  • idnumber name age tuitionfee scores 102 Mari Mar 20 20500.75 5 8 10 9 9 (correct)
  • length(Rectangle rec); //returns the length of the rectangle
  • idnumber name age tuitionfee scores 101 Jose Rizal 18 24500.25 10 8 10 9 9
  • What does 's' represent in the function declaration mentioned in the text?

    <p>Student structure</p> Signup and view all the answers

    Which operator is no longer used in the input function according to the text?

    <p>-&gt; operator</p> Signup and view all the answers

    What would be returned by the function 'area(Rectangle rec)'?

    <p>Area of the rectangle</p> Signup and view all the answers

    What is typically passed along with an array when it is passed to a function?

    <p>Array size</p> Signup and view all the answers

    Which data does the 'tuitionfee' field store in the structure Student?

    <p>$24500.25</p> Signup and view all the answers

    'John Son' in the text has what age?

    <p>$19</p> Signup and view all the answers

    'Mari Mar' in the text has how many test scores?

    <p>$5</p> Signup and view all the answers

    More Like This

    C Struct Quiz
    10 questions

    C Struct Quiz

    PoignantTan avatar
    PoignantTan
    JavaScript Strict Mode
    8 questions

    JavaScript Strict Mode

    EverlastingImpressionism avatar
    EverlastingImpressionism
    C# 2 Flashcards: Struct vs Class
    17 questions
    C Programming Week 12
    20 questions

    C Programming Week 12

    LuxuryAbundance avatar
    LuxuryAbundance
    Use Quizgecko on...
    Browser
    Browser