Is the following code legal?
struct a
{
int x;
struct a b;
}
Answer / susie
Answer :
No
Explanation:
Is it not legal for a structure to contain a member
that is of the same
type as in this case. Because this will cause the structure
declaration to be recursive without end.
| Is This Answer Correct ? | 1 Yes | 0 No |
void main() { int i=i++,j=j++,k=k++; printf(“%d%d%d”,i,j,k); }
Implement a t9 mobile dictionary. (Give code with explanation )
1 Answers Amazon, Peak6, Yahoo,
main() { int i = 258; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }
Write a program to print a square of size 5 by using the character S.
How can I Create a C program in splitting set of characters to specific subsets. Example: INPUT SET OF CHARACTERS: Therefore, my dear brothers and sisters, stand firm. Let nothing move you. Always give yourselves fully to the work of the Lord, because you know that your labor in the Lord is not in vain. SPLIT INTO HOW MANY CHARACTERS PER SUBSETS: 10 OUTPUT: Therefore, my dear b rothers an d sisters, stand fir m. Let not hing move you. Alway s give you rselves fu lly to the work of t he Lord, b ecause you know that your labo r in the L ord is not in vain.
Program to find the largest sum of contiguous integers in the array. O(n)
Write a program that find and print how many odd numbers in a binary tree
main() { char str1[] = {‘s’,’o’,’m’,’e’}; char str2[] = {‘s’,’o’,’m’,’e’,’\0’}; while (strcmp(str1,str2)) printf(“Strings are not equal\n”); }
write a program to count the number the same (letter/character foreg: 's') in a given sentence.
#define assert(cond) if(!(cond)) \ (fprintf(stderr, "assertion failed: %s, file %s, line %d \n",#cond,\ __FILE__,__LINE__), abort()) void main() { int i = 10; if(i==0) assert(i < 100); else printf("This statement becomes else for if in assert macro"); }
Write a routine that prints out a 2-D array in spiral order
main() { register int a=2; printf("Address of a = %d",&a); printf("Value of a = %d",a); }