ADITI Company Programming Program

Q. Give the output for the following program segment.

#ifdef TRUE
int I=0;
#endif

main()
{
int j=0;
printf("%d %dn",i,j);
}

Read Solution (Total 2)

ADITI Other Question

Q. Give the output for the following program.

#define STYLE1 char
main()
{
typedef char STYLE2;
STYLE1 x;
STYLE2 y;
clrscr();
x=255;
y=255;
printf("%d %dn",x,y);
}
Q. In the following program

#include
main()
{
char *pDestn,*pSource="I Love You Daddy";
pDestn=malloc(strlen(pSource));
strcpy(pDestn,pSource);
printf("%s",pDestn);
free(pDestn);
}
Option
(a)Free() fails
(b)Strcpy() fails
(c)prints I love You Daddy
(d)error