GoConqr has a new look! Let us know what you think.

Quiz

Big O notation and C++ pointers, arrays and strings

Tamerlan Sandykbaev 39 questions

Take the quiz

This quiz has a time limit, so it opens in the usual player.

Questions in this quiz (39)

  1. 1Show the representation of linear runtime algorithm with Big O notation
    1. AO (n log n)
    2. BThere is no correct answer
    3. CO (1)
    4. DO (n)
    5. EO (n^2)
  2. 2What for Big O notation is used?
    1. Ato write the pseudocode for an algorithm
    2. Bthere is no correct answer
    3. Cto estimate the worst-case runtime for an algorithm
    4. Dto change the iteration algorithm to recursive one
    5. Eto write the function
  3. 3Show the representation of exponential runtime algorithm with Big O notation
    1. AO (2)
    2. BO (log n)
    3. CO (n^2)
    4. DO (2^n)
    5. EThere is no correct answer
  4. 4What will be the output of cout << **suit, IF const char *suit[] = {"Hearts", "Diamonds", "Clubs", "Spades"};?
    1. ASome address
    2. BHeartsDiamondsClubsSpades
    3. CH
    4. DThere is no correct answer
    5. EHearts
  5. 5The smallest addressable unit of memory is
    1. Aa byte
    2. Ba bit
    3. Ca megabyte
    4. Da kilobyte
    5. EThere is no correct answer
  6. 6Show the representation of logarithmic runtime algorithm with Big O notation
    1. AO (n)
    2. BO (2^n)
    3. CThere is no correct answer
    4. DO (log n)
    5. EO (n^2)
  7. 7What happens if you try to compile and run this program?
    int main() {
    char s[10] = "ABCDE", * p = s + 2;
    cout << p[1] - p[-1];
    system("pause");
    return 0;
    }
    1. Athe program outputs 1
    2. Bthe program outputs 2
    3. Cthe program outputs 3
    4. Dthe program outputs 4
    5. Ethe program outputs 5
  8. 8Show the representation of logarithmic linear runtime algorithm with Big O notation
    1. AO (2^n)
    2. BO (n^2)
    3. CO (n log n)
    4. DO (log 2)
    5. EThere is no correct answer
  9. 9What is the correct way of creating object of array container?
    1. Aarray<int, 5> arr;
    2. Barray<> arr;
    3. Carray<5> arr;
    4. Darray<int, string> arr;
    5. Earray<int> arr;
  10. 10What will be the output of cout << *(*(suit + 2) + 2), if const char *suit[] = {"Hearts", "Diamonds", "Clubs", "Spades"};
    1. Au
    2. Bi
    3. CSome address
    4. DDiamonds
    5. EClubs

Information

Description
Quiz on Untitled, created by Tamerlan Sandykbaev on 11/06/2019.
Language
English
Views
7
Rating
No ratings yet
Rate this quiz
Rate this quiz

Feedback

What is it about?

What do you think of the new look?

How do you like it?