Memory is allocated from_______________for each and every malloc function call
Stack
Heap
Static memory area
Cache
Answer: Option B.
When is a static variable initialized?
Every time the function containing it is called.
When it is globally declared.
Only when declared within a function.
Only the first time the function containing it is called
Answer: Option D.
What would be the output of following code?
#include<stdio.h>
int main(int argc,char **argv)
{
int iVar=0, iCnt, aiArr[] = {56,23,4,89,-200,34};
for(iCnt = 1; iCnt <6; iCnt++)
{
if(aiArr[iCnt] < aiArr[iVar])
iVar = iCnt;
}
printf("%d",iVar);
return 0;
}
4
89
3
-200
Answer: Option A.
Which of the following is not a type of constructor?
Copy constructor
Friend constructor
Default constructor
Parameterized constructor
Answer: Option B.
Under which of the following Big O notation it is suggested to review design of algorithm?