Write a Program for read a line from file from location N1 to N2 using command line arguments. Eg:exe 10 20 a.c
No Answer is Posted For this Question
Be the First to Post Answer
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?
What is an undefined behavior and sequence points
string somestring ; Which of the following choices will convert a standard C++ string object "somestring" to a C string? a) Copy.somestring () ; b) somestring.c_str () c) &somestring [1] d) std::cstring (somestring) e) (char *) somestring
What is called array?
What are activex and ole?
Is python better than c++?
Can malloc be used in c++?
Is c++ the most powerful language?
What does override mean in c++?
What is the difference between containment and delegation?
What is a pointer with example?
Explain the differences between private, public and protected and give examples.