answer this plz

Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: May 2006
Posts: 3,131
Reputation: WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of WaltP has much to be proud of 
Solved Threads: 283
Moderator
WaltP's Avatar
WaltP WaltP is offline Offline
Posting Sensei
 
3
  #11
Oct 19th, 2009
Originally Posted by Shillz View Post
how can we use a printf statement without a semicolon???
this was a question asked during an interview of a computer engineering student.
Assuming this was a job interview, I suggest you stay away from any job that asks foolish questions like this. I would not want to work for a company that want it's programmers to use tricks that make code unreadable.
The 3 Laws of the Procrastination Society:
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 212
Reputation: MrNoob has a little shameless behaviour in the past 
Solved Threads: 6
MrNoob's Avatar
MrNoob MrNoob is offline Offline
Posting Whiz in Training
 
-2
  #12
Oct 19th, 2009
well maybe u can define ; as a other name then use other name as derived type
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 1,970
Reputation: tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute 
Solved Threads: 214
tux4life's Avatar
tux4life tux4life is offline Offline
Posting Virtuoso
 
2
  #13
Oct 19th, 2009
Originally Posted by Shillz View Post
how can we use a printf statement without a semicolon???
this was a question asked during an interview of a computer engineering student.
You can always put the call to printf in an if-statement, like this:
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. if( printf("Hello World!\n") ) {}
  6. return 0;
  7. }
As you can see, no semicolon is needed to invoke the printf function.

Originally Posted by WaltP View Post
Assuming this was a job interview, I suggest you stay away from any job that asks foolish questions like this. I would not want to work for a company that want it's programmers to use tricks that make code unreadable.
Quoted for the truth.
"Never argue with idiots, they just drag you down to their level and then beat you with experience."
Reply With Quote Quick reply to this message  
Reply

Message:



Similar Threads
Other Threads in the C Forum


Views: 524 | Replies: 12
Thread Tools Search this Thread



Tag cloud for C
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC