Skip to main content

Command Palette

Search for a command to run...

Precedence

Published
1 min readView as Markdown
#include <stdio.h>

int main() {
    int a = 10;
    int b = a>=3?2*a:3*a;
    printf("b : %d",b);
}

First a is compared with 3

Then 2*a gets performed.

Finally assignment operator makes the value of b as 20

9 views

More from this blog

P

Programming Tutorials

89 posts