944,098 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Marked Solved
  • Views: 1280
  • C RSS
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Oct 19th, 2009
3
Re: answer this plz
Click to Expand / Collapse  Quote originally posted by Shillz ...
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.
Moderator
Reputation Points: 3281
Solved Threads: 895
Posting Sage
WaltP is offline Offline
7,747 posts
since May 2006
Oct 19th, 2009
-2
Re: answer this plz
well maybe u can define ; as a other name then use other name as derived type
Reputation Points: 34
Solved Threads: 7
Posting Whiz in Training
MrNoob is offline Offline
218 posts
since May 2009
Oct 19th, 2009
3
Re: answer this plz
Click to Expand / Collapse  Quote originally posted by Shillz ...
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.

Click to Expand / Collapse  Quote originally posted by WaltP ...
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.
Reputation Points: 2125
Solved Threads: 243
Postaholic
tux4life is offline Offline
2,105 posts
since Feb 2009
Jan 8th, 2010
0
Re: answer this plz
@waltp
yeah..this was asked in a job interview
Reputation Points: 5
Solved Threads: 0
Newbie Poster
Shillz is offline Offline
23 posts
since Oct 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: Binary Search in C Spell Checker
Next Thread in C Forum Timeline: problem to convert binary numbers to decimal. Someone HELP





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC