Ternary Operator: (cond ? const_str : nonconst_str) legal?

Dr. T. Andrews tanner at cdis-1.compu.com
Sat Jun 2 07:14:34 AEST 1990


Given:
	char		nonconst_str[10];
	const char	const_str[10] = "123456789";
	int		cond, blunge;
Is the following legal?
	blunge = printf("%s\n", cond ? const_str : nonconst_str);
-- 
uflorida!ki4pv!cdis-1!tanner {uunet dsinc}!cdin-1!cdis-1!tanner



More information about the Comp.lang.c mailing list