Question { 12914 }
Why doesn't the code "int a = 1000, b = 1000;
long int c = a * b;" work?
Answer
Is This Answer Correct ? | 0 Yes | 2 No |
Question { 14773 }
What's wrong with "char *p; *p = malloc(10);"?
Answer
Is This Answer Correct ? | 21 Yes | 1 No |
Question { 12729 }
How can I set an array's size at run time?
Answer
Is This Answer Correct ? | 2 Yes | 5 No |
Question { Aloha Technology, 8026 }
When you call malloc() to allocate memory for a local
pointer, do you have to explicitly free() it?
Answer
Is This Answer Correct ? | 20 Yes | 0 No |
Question { Geometric Software, 13980 }
difference between my-strcpy and strcpy ?
Answer
Is This Answer Correct ? | 5 Yes | 2 No |
f(char *p)
{
p=(char *)malloc(sizeof(6));
strcpy(p,"HELLO");
}
main()
{
char *p="BYE";
f(p)
printf("%s",p);
}
what is the output?
Answer
Is This Answer Correct ? | 1 Yes | 4 No |
What will be the result of the following program?
main()
{
char p[]="String";
int x=0;
if(p=="String")
{
printf("Pass 1");
if(p[sizeof(p)-2]=='g')
printf("Pass 2");
else
printf("Fail 2");
}
else
{
printf("Fail 1");
if(p[sizeof(p)-2]=='g')
printf("Pass 2");
else
printf("Fail 2");
}
}
a) Pass 1, Pass 2
b) Fail 1, Fail 2
c) Pass 1, Fail 2
d) Fail 1, Pass 2
e) syntax error during compilation
Answer
Is This Answer Correct ? | 0 Yes | 2 No |
Switch (i)
i=1;
case 1
i++;
case 2
++i;
break;
case 3
--i;
Output of i after executing the program
Answer
Is This Answer Correct ? | 7 Yes | 0 No |