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 |
what is variable length argument list?
#define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts("NULL"); else if(FALSE) puts("TRUE"); else puts("FALSE"); }
Give a one-line C expression to test whether a number is a power of 2.
#include<stdio.h> int main() { int a=3,post,pre; post= a++ * a++ * a++; a=3; pre= ++a * ++a * ++a; printf("post=%d pre=%d",post,pre); return 0; }
void func1(int (*a)[10]) { printf("Ok it works"); } void func2(int a[][10]) { printf("Will this work?"); } main() { int a[10][10]; func1(a); func2(a); } a. Ok it works b. Will this work? c. Ok it worksWill this work? d. None of the above
main() { char *p; p="Hello"; printf("%c\n",*&*p); }
void main() { printf(“sizeof (void *) = %d \n“, sizeof( void *)); printf(“sizeof (int *) = %d \n”, sizeof(int *)); printf(“sizeof (double *) = %d \n”, sizeof(double *)); printf(“sizeof(struct unknown *) = %d \n”, sizeof(struct unknown *)); }
main() { register int a=2; printf("Address of a = %d",&a); printf("Value of a = %d",a); }
To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']
main() { int c = 5; printf("%d", main||c); } a. 1 b. 5 c. 0 d. none of the above
int swap(int *a,int *b) { *a=*a+*b;*b=*a-*b;*a=*a-*b; } main() { int x=10,y=20; swap(&x,&y); printf("x= %d y = %d\n",x,y); }
Program to Delete an element from a doubly linked list.
4 Answers College School Exams Tests, Infosys,