Code
#include<iostream>
int main()
{
int a=4,b,c;
a==3 ? : b=a*a ; // Works fine
a==4 ? c=a*a : ; // ERROR Expected Primary expression before ;
}
1st conditional statement
I did not write 'Expression 2' but it will not produce error
2nd Conditional statement
I did not write 'Expression 3' it gives an error
so why it is differentiating in 'Expression 2' and 'Expression 3' ?