Is c++ the hardest language?
No Answer is Posted For this Question
Be the First to Post Answer
How many types of modularization are there in c++?
What are the advantages of C++ programming compared to C programming?
How to defines the function in c++?
What flag means?
What is the difference between map and hashmap in c++?
Explain the concept of copy constructor?
what kind of projects are suitable for c and c++
What do you mean by function overriding & function overloading in c++?
When do we run a shell in the unix system? How will you tell which shell you are running?
Why did you leave your last job?
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?
Why are arrays usually processed with for loop?