Is the following code legal?
void main()
{
typedef struct a aType;
aType someVariable;
struct a
{
int x;
aType *b;
};
}
Answer / susie
Answer :
No
Explanation:
When the declaration,
typedef struct a aType;
is encountered body of struct a is not known. This is known
as ‘incomplete types’.
Is This Answer Correct ? | 2 Yes | 1 No |
void main () { int x = 10; printf ("x = %d, y = %d", x,--x++); } a. 10, 10 b. 10, 9 c. 10, 11 d. none of the above
What is wrong with the following code? int *foo() { int *s = malloc(sizeof(int)100); assert(s != NULL); return s; }
main() { show(); } void show() { printf("I'm the greatest"); }
what is the code of the output of print the 10 fibonacci number series
main() { char *str1="abcd"; char str2[]="abcd"; printf("%d %d %d",sizeof(str1),sizeof(str2),sizeof("abcd")); }
how to print 1 2 3 4 5 6 7 8 9 10 9 8 7 6 5 4 3 2 1 using any loop(for or while) only once(only 1 loop) and maximum 2 variables using C.
19 Answers Cap Gemini, Infosys,
Cau u say the output....?
What is "far" and "near" pointers in "c"...?
main() { int a=2,*f1,*f2; f1=f2=&a; *f2+=*f2+=a+=2.5; printf("\n%d %d %d",a,*f1,*f2); }
#define a 10 void foo() { #undef a #define a 50 } int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } explain the answer
1 o 1 1 0 1 0 1 0 1 1 0 1 0 1 how to design this function format in c-language ?
could you please send the program code for multiplying sparse matrix in c????