¡GoConqr estrena diseño! Cuéntanos qué te parece.

Test

C++ classes and linked lists questions

Adam Fisher 4 preguntas

Hacer el test

Preguntas del test (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++

Información

Descripción
Test sobre Sin título, creado por Adam Fisher el 06/04/2017.
Idioma
English
Visitas
0
Valoración
Aún sin valoraciones
Valora este test
Valora este test

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?