Which
version do you prefer of the following two,
1) printf(“%s”,str); // or the more curt one
2) printf(str);
Answer & Explanation:
Prefer the first one. If the
str contains any format characters like
%d then it will result in a subtle bug.
Blog Author: Vijay Kumar
Go to: Java Aptitude, C C++ Aptitude
No comments:
Post a Comment