a question on "argc >3 ? argv[i]:NULL"

There is code snippet

1
2
3
4
5
6
7
8
9
Int  main(int argc,  char *argv[ ])
{
FILE   *f;
f = fopen(argv[i], "r"); 
If (grep(argv[1],  f ,  argc >3 ? argv[i]:NULL)>0) {
  /* do sth */
}

}


I do not understand how does the logic in if mean? In specific, what does

argc >3 ? argv[i]:NULL mean? Thanks

It's the conditional operator.
http://cplusplus.com/doc/tutorial/operators/
Topic archived. No new replies allowed.