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 |
main() { int y; scanf("%d",&y); // input given is 2000 if( (y%4==0 && y%100 != 0) || y%100 == 0 ) printf("%d is a leap year"); else printf("%d is not a leap year"); }
Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.
Printf can be implemented by using __________ list.
#include<stdio.h> #include<conio.h> void main() { int a=(1,2,3,(1,2,3,4); switch(a) { printf("ans:"); case 1: printf("1");break; case 2: printf("2");break; case 3: printf("1");break; case 4: printf("4");break; printf("end"); } getch(); }
Program to Delete an element from a doubly linked list.
4 Answers College School Exams Tests, Infosys,
main() { int i; printf("%d",scanf("%d",&i)); // value 10 is given as input here }
main() { char str1[] = {‘s’,’o’,’m’,’e’}; char str2[] = {‘s’,’o’,’m’,’e’,’\0’}; while (strcmp(str1,str2)) printf(“Strings are not equal\n”); }
main() { int i = 257; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }
programming in c lanugaue programm will errror error with two header file one as stdio.h and other one is conio.h
void main() { int x,y=2,z; z=(z*=2)+(x=y=z); printf("%d",z); }
{ int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }
what is the code of the output of print the 10 fibonacci number series