How can you be sure that a program follows the ANSI C standard? Ans. The ANSI C standard provides a predefined symbol named __STDC__ that is set to 1 when the compiler is enforcing strict ANSI standard conformance. If you want your programs to be 100 percent ANSI conformant, you should ensure that the __STDC__ symbol is defined. If the program is being compiled with non-ANSI options, the __STDC__ symbol is undefined. The following code segment shows how this symbol can be checked: #ifdef __STDC__ printf('Congratulations! You are conforming perfectly to the ANSI standards!\n'); #else printf('Shame on you, you nonconformist anti-ANSI rabble-rousing programmer!\n'); #endif - Study24x7
Social learning Network
27 Mar 2023 11:56 AM study24x7 study24x7

How can you be sure that a program follows the ANSI C standard? Ans. The ANSI C standard provides a predefined symbol named __STDC__ that is set to 1 when the compiler is enforcing strict ANSI standard conformance. If you want your programs to be 100 percent ANSI conformant, you...

See more

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles