Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  error
Language: C/C++
Code:
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>

int main(void)
{
    struct s {
        int i;
        char c;
        double d;
        char a[];
    };

   /* Output is compiler dependent */

   printf("offsets: i=%ld; c=%ld; d=%ld a=%ldn",
            (long) offsetof(struct s, i),
            (long) offsetof(struct s, c),
            (long) offsetof(struct s, d),
            (long) offsetof(struct s, a));
    printf("sizeof(struct s)=%ldn", (long) sizeof(struct s));

   exit(EXIT_SUCCESS);
}#include <stdio.h>
int main(int argc, char *argv[])
{
     printf("Hello World!");
     getchar();
     return 0;
}
          
          
Comments: