main()
{
char a[4]="HELL";
printf("%s",a);
}
Answers were Sorted based on User's Feedback
Answer / susie
Answer :
HELL%@!~@!@???@~~!
Explanation:
The character array has the memory just enough to hold the
string “HELL” and doesnt have enough space to store the
terminating null character. So it prints the HELL correctly
and continues to print garbage values till it accidentally
comes across a NULL character.
| Is This Answer Correct ? | 25 Yes | 10 No |
Answer / harshawardhan
HELL
It will print "HELL" because Character array of size 0 to 4 mean it may hold 5 places. One for Null character and other four for HELL total 5.
| Is This Answer Correct ? | 3 Yes | 0 No |
Find the largest number in a binary tree
main() { 41printf("%p",main); }8
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }
main() { int i=400,j=300; printf("%d..%d"); }
why nlogn is the lower limit of any sort algorithm?
main() { show(); } void show() { printf("I'm the greatest"); }
main() { static char names[5][20]={"pascal","ada","cobol","fortran","perl"}; int i; char *t; t=names[3]; names[3]=names[4]; names[4]=t; for (i=0;i<=4;i++) printf("%s",names[i]); }
main() { while (strcmp(“some”,”some\0”)) printf(“Strings are not equal\n”); }
main() { int a=2,*f1,*f2; f1=f2=&a; *f2+=*f2+=a+=2.5; printf("\n%d %d %d",a,*f1,*f2); }
#include <stdio.h> #define a 10 main() { #define a 50 printf("%d",a); }
write a c program to print magic square of order n when n>3 and n is odd?
main() { extern i; printf("%d\n",i); { int i=20; printf("%d\n",i); } }