Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // C program compiles & runs fine, even ; missing at end of struct
- #include <stdio.h>
- struct test
- { int a,b}; // missing semicolon
- int main()
- {
- struct test d={3,6};
- printf("%d",d.a);
- return 0;
- }
- // Following is compilation error in C++
- #include <stdio.h>
- struct test
- { int a,b}; // missing semicolon
- int main()
- {
- struct test d={3,6};
- printf("%d",d.a);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement