GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Quiz

C++ classes and linked lists questions

Adam Fisher 4 Fragen

Quiz starten

Fragen in diesem Quiz (4)

  1. 1How many members (data and functions) does the following class have?
    {
    public:
    Rational()
    Rational(int, int)
    Rational(int)
    int getN();
    int getD();
    friend void display();

    private:
    int
    int
    1. A6
    2. B7
    3. C2
    4. D3
  2. 2What is wrong with the following overloaded extraction operator declaration?
    istream& operator >>(istream& in, const myClass &object);
    1. Aa. You cannot put the & on the return type
    2. Bb. Object should not be a pass by reference parameter
    3. Cc. Object should not be a const parameter
    4. Dd. nothing
  3. 3As defined in the text, the pointer variable head
    1. Aa. points to the first node in the list.
    2. Bb. is the first node in the list.
    3. Cc. is always NULL.
    4. Dd. is undefined.
  4. 4Which of the following loops correctly uses iter as an iterator to move through the
    nodes of the linked list?
    1. Aa. for(iter=NULL; iter != NULL; iter=iter->link)
    2. Bb. for( iter=head; iter != NULL; iter=iter->link)
    3. Cc. while(iter!=NULL)
      iter=iter->link
    4. Dd. while(iter!=NULL)
      iter++

Informationen

Beschreibung
Quiz am Ohne Titel, erstellt von Adam Fisher am 06/04/2017.
Sprache
English
Aufrufe
0
Bewertung
Noch keine Bewertungen
Bewerte dieses Quiz
Bewerte dieses Quiz

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck