diff between pointer and reference in c++?
Answer / ravi.g
pointers have valid memory but reference does not have
memory
It means pointers points to some address(memory)
Reference does not points to any address(memory)
| Is This Answer Correct ? | 2 Yes | 0 No |
True or false, if you keep incrementing a variable, it will become negative a) True b) False c) It depends
How do you add an element to a set in c++?
Assume studentNames and studentIDs are two parallel arrays of size N that hold student data. Write a pseudocode algorithm that sorts studentIDs array in ascending ID number order such that the two arrays remain parallel.
Is c++ still in demand?
What do nonglobal variables default to a) auto b) register c) static
What are the differences between a struct in C and in C++?
What is a node class in c++?
Discussion on error handling of C++ .
What is new in c++?
What is an Object/Instance?
in C++ , the word plus plus who found this?
1)#include <iostream.h> int main() { int *a, *savea, i; savea = a = (int *) malloc(4 * sizeof(int)); for (i=0; i<4; i++) *a++ = 10 * i; for (i=0; i<4; i++) { printf("%d\n", *savea); savea += sizeof(int); } return 0; } 2)#include <iostream.h> int main() { int *a, *savea, i; savea = a = (int *) malloc(4 * sizeof(int)); for (i=0; i<4; i++) *a++ = 10 * i; for (i=0; i<4; i++) { printf("%d\n", *savea); savea ++; } return 0; } The output of this two programs will be different why?