silly questions !!!!!

View previous topic View next topic Go down

silly questions !!!!!

Post by BIT0112-Rokon on Mon Aug 17, 2009 8:08 pm

hey guys,
Though we know the syntax of C programming language well, yet I'm going to post here some really silly question......

1. Is it possible to write a program without main?
2. Is it possible to multiply two number without using *?
3. Is it possible to write a program that can print source code of itself ?
4.
main(){int a;
a = (7==5?4 : 3)
  cout<<a;
}
what will be the output..?

cheers!!
bazlurrr


Last edited by bit0112-rokon on Sun Nov 01, 2009 2:43 pm; edited 5 times in total
avatar
BIT0112-Rokon
Programmer
Programmer

Course(s) :
  • BIT

Blood Group : O+
Posts : 673
Points : 1269

View user profile http://blog.codexplo.org

Back to top Go down

Re: silly questions !!!!!

Post by BIT0129-Tabassum on Mon Aug 17, 2009 8:22 pm

Dear friend,
I have a tricky answer for your 2nd question........
You can use plus(+ ) instead of asterisk(*)... Very Happy
e.g. we can represent 2*4 as 2+2+2+2.... Laughing
avatar
BIT0129-Tabassum
Global Moderator
Global Moderator

Course(s) :
  • BIT

Blood Group : A+
Posts : 1496
Points : 2298

View user profile http://probe-tabassum.blogspot.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum