Printing a statement without using semi colon

How to swap two numbers without using temporary variable?

Questions by rabia.sultana14

Showing Answers 1 - 4 of 4 Answers

vinaysubramanian

  • Jul 17th, 2011
 

Code
  1. #include<stdio.h>

  2. #include<conio.h>

  3. void main()

  4. {

  5.    int a=2,b=3;

  6.    a=a+b;

  7.    b=a-b;

  8.    a=a-b;

  9.    printf("%d %d ",&a,&b);

  10. }  

  Was this answer useful?  Yes

Shiva

  • Sep 27th, 2011
 

Place the statement you want to print in the if block

Code
  1. void main()

  2. {

  3. if((printf("hai shiva shankar"))

  4. {

  5. }

  6. }

  7.  

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions