How can you quickly find the number of elements stored in a
a) static array b) dynamic array ?

Answer Posted / guest

static array

Is This Answer Correct ?    1 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a manipulator in c++?

743


Carry out conversion of one object of user-defined type to another?

650


What is the difference between global variables and static varables?

612


What data encapsulation is in c++?

627


What does std mean in c++?

623






What are the types of container classes?

644


You run a shell on unix system. How would you tell which shell are you running?

690


What do you mean by const correctness?

660


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

717


What do you understand by pure virtual function? Write about its use?

616


Is string data type in c++?

618


Is set c++?

608


how can i access a direct (absolute, not the offset) memory address? here is what i tried: wrote a program that ask's for an address from the user, creates a FAR pointer to that adress and shows it. then the user can increment/decrement the value in that address by pressing p(inc+) and m(dec-). NOW, i compiled that program and opened it twice (in 2 different windows) and gave twice the same address to it. now look what happen - if i change the value in one "window" of the program, it DOES NOT change in the other! even if they point to the same address in the memory! here is the code snippet: //------------------------------------------------------ #include //INCLUDE EVERY KNOWN HEADER FILE #include //FOR ANY CASE... #include #include #include main() { int far *ptr; //FAR POINTER!!! long address; char key=0; //A KEY FROM THE KEYBOARD int temp=0; clrscr(); cout<<"Enter Address:"; cin>>hex>>address; //GETS THE ADDRESS clrscr(); (long)ptr=address; temp=*ptr; //PUTS THE ADDRESS IN THE PTR cout<<"["<

1847


Does std endl flush?

630


How compile and run c++ program in turbo c++?

683