What is the requirment of using fflush() in multiple scanf calls.
Latest Answer: scanf could leave some characters in the input stream based on what is specified inthe format specifier says "%s" etc. The fflush is done to take care that the subsequent scanf does not read these extraneous characters. ...
Write a program to read a file, strip the comments and write the output to another file.
Latest Answer: {FILE *f, *of;f = fopen("c:/myprog1.cpp", "r"); of = fopen("c:/comments.cpp", "a");char* ch = new char[2]; *ch = fgetc(f);int l=0;while (!feof(f)) {if ((*ch == '/') && (fgetc(f)=='/')) {l++;do{*ch ...
Explain the virtual table generated in memory at the time of declaration of virtual function?
What is the slack memory concept in allocation of structure memory?
Write a program in C that does nothing not even takes memory?
Latest Answer: void main(){} ...
Write a program in C to display output as "hello world" without using semicolon(;)?
Latest Answer: main(){if(printf("hello world"))} ...
What is Field Width Specification?
Latest Answer: field width specification means to allocate the a particular fixed size of a varriable whether varriable is small in size or big.eg:if we allocate a field width of a varriable is 10 and the varriable is a[5] then it will just take a five block ...
What is BSS segment? Where it will be?
Latest Answer: BSS stores the variables which are initialized to 0 ...
1. #define MAX 1002. main()3. {4. int max=100;5. int a[MAX];6. int b[max];7. }
Latest Answer: On 5th statement work fine.
But on 6 the statement it gives compilation error.
error C2057: expected constant expression
error C2466: cannot allocate an array of constant size 0
error C2133: 'b' : unknown size
Conclusion:
The macro value expansion ...
we say stack is allocated to the local variables ,formal arguments and return addresses of a function for manipulating function calls?but the question arises when does the stack allocation to above things
Latest Answer: Memory is allocated only during the runtime, and compiler just decides the amount of memory needed by each variable... It just adds the displacement value to be added to the Base Stack pointer for "Local Variables" Allocation. ...
View page [1] 2 3 4 5 6 7 8 9 10 Next >>

Go Top