top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What are the standard predefined macros in C language?

+5 votes
412 views
What are the standard predefined macros in C language?
posted Nov 19, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

0 votes

Following six I know may be more are there -

_ _LINE_ _ Inserts the current source code line number in your code.
_ _FILE_ _ Inserts the current source code filename in your code.
_ DATE_ Inserts the current date of compilation in your code.
_ _TIME_ _ Inserts the current time of compilation in your code.
_ _STDC_ _ Is set to 1 if you are enforcing strict ANSI C conformity.
_ _cplusplus Is defined if you are compiling a C++ program.
answer Nov 19, 2013 by Salil Agrawal
0 votes
__DATE__
__TIME__
__FUNCTION__   => Most Useful
answer Nov 19, 2013 by Vikas Upadhyay
Similar Questions
0 votes

Can anyone help me with a C program to design a simple state machine by using macros?

Requirement
S1,S2,S3,S4 are the states and E1, E2,E3,E4,E5,E6,E7,E8 are events ...

when states moving from one state to another respective event should trigger
s1 to s2 ------> E1
s2 to s3 ------> E2
s3 to s4 ------> E3
s4 to s1 ------> E4
s1 to s4 ------> E5
s4 to s3 ------> E6
s3 to s2 ------> E7
s2 to s1 ------> E8

Please share the C program

+1 vote

I want to generate the following series in C language, please help.

1
2 3
3 4 5
4 5 6 7
5 6 7 8 9
6 7 8 9 10 11
+3 votes
#include <stdio.h>
int main()
{
    char vowels[5]={'a','e','i','o','u'};
    int x;

    printf("Vowel Letters");
    for(x=0;x<=5;x++)
    {
         printf("\n %C",vowels[x]);
    }
}

Output

Vowel Letters
a
e
i
o
u
♣
Process exited after 0.1132 seconds with return value 3

What is the meaning of return value 3

...