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 |
main() { char *p="GOOD"; char a[ ]="GOOD"; printf("\n sizeof(p) = %d, sizeof(*p) = %d, strlen(p) = %d", sizeof(p), sizeof(*p), strlen(p)); printf("\n sizeof(a) = %d, strlen(a) = %d", sizeof(a), strlen(a)); }
WAP to display 1,2,3,4,5........N
How to swap two variables, without using third variable ?
104 Answers AB, ADP, BirlaSoft, Cisco, Cygnet Infotech, HCL, Hewitt, Honeywell, HP, IBM, Infosys, Manhattan, Microsoft, Mobius, Percept, Satyam, SofTMware, TCS, Wipro, Yamaha,
#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }
how can i search an element in an array
2 Answers CTS, Microsoft, ViPrak,
write a simple calculator c program to perform addition, subtraction, mul and div.
0 Answers United Healthcare, Virtusa,
Find your day from your DOB?
15 Answers Accenture, Microsoft,
1 o 1 1 0 1 0 1 0 1 1 0 1 0 1 how to design this function format in c-language ?
to remove the repeated cahracter from the given caracter array. i.e.., if the input is SSAD output should of SAD
How to use power function under linux environment.eg : for(i=1;i<=n;i++){ pow(-1,i-1)} since it alerts undefined reference to 'pow'.
What is the main difference between STRUCTURE and UNION?
Write a program to model an exploding firecracker in the xy plane using a particle system