What is the Difference between "vector" and "array"?

Answer Posted / sanish joseph

A growable array is calld vector while array is of fixed size,

Is This Answer Correct ?    41 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we define a constructor as virtual in c++?

603


Which field is used in c++?

633


What would happen on forgetting [], while deallocating an array through new?

631


Explain the pure virtual functions?

634


Write bites in Turbo c++ Header ("Include") Files.

680






What is the difference between an array and a list?

584


What is #include iostream h in c++?

609


What is the return value of the insertion operator?

599


Specify different types of decision control statements?

352


Write a program using merge () function to combine the elements of array x[ ] and y[ ] into array z[ ].

601


What is the use of setprecision in c++?

540


What are advantages of using friend classes?

631


What is general format for a prototype?

595


A prime number is a number which is divisible only by itself and 1. Examples of the first few primes are 2, 3, 5, 7, 11. Consider writing a program which can generate prime numbers for you. Your program should read in and set a maximum prime to generate and a minimum number to start with when looking for primes. This program should be able to perform the following tasks: 1. Read the maximum number from user (keyboard input) to look for primes. The program should not return any primes greater than this number. 2. Read the minimum number from user (keyboard input) to look for primes. The program should not return any primes less than this number. 3. Generate and print out every prime number between the maximum prime and minimum number specified by the user.

1742


Function can be overloaded based on the parameter which is a value or a reference. Explain if the statement is true.

641