41.
The following C code is an example of . . . . . . . .
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
main()
{
    char *p,*q;
    p=(char*)malloc(3*sizeof(char));
    q=p;
    strcpy(p,"hello");
    printf("p=%s",p);
    printf("q=%s",q);
    free(q);
    q=NULL;
    gets(p);
    gets(q);
    printf("%s",p);
    printf(“%s”,q);
}

46.
What will be the error (if any) in the following C code?
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
    char *p;
    *p = (char)calloc(10);
    strcpy(p, "HELLO");
    printf("%s", p);
    free(p);
    return 0;
}

47.
What will happens if the statement free(a) is removed in the following C code?
#include<stdio.h>
#include<stdlib.h>
main()
{
    int *a;
    a=(int*)malloc(sizeof(int));
    *a=100;
    printf("*a%d",*a);
    free(a);
    a=(int*)malloc(sizeof(int));
    *a=200;
    printf("a%p",a);
    *a=200;
    printf("a%d",*a);
}

48.
In the function realloc(), if the new size of the memory block is larger than the old size, then the added memory . . . . . . . .

49.
What will be the output of the following C code if it is executed on a 32 bit processor?
#include<stdio.h>
#include<stdlib.h>
int main()
{
    int *p;
    p = (int *)malloc(20);
    printf("%d\n", sizeof(p));
    free(p);
    return 0;
}