[algogeeks] output

2011-05-27 Thread Bhavesh agrawal
#include /* copy input to output; 2nd version */ main() { int c; while ((c = getchar()) != EOF && printf("%d\n",c)) {putchar(c); printf("\n");} } it's output is like a 97 a 10 b 98 b 10 i dont understand the meaning of 10 here -- You received this message because you are subscribed to the Go

Re: [algogeeks] Output of the code

2011-04-07 Thread Munish Goyal
Dude Umer. Now i think the output is clear to you. Anyhow it is not appropriate to instigate in a worldwide group by putting in such comments and that too in a trivial (unsolicited, spam) question post. I hope the moderator takes note of this. On Mon, Mar 28, 2011 at 1:24 PM, Umer Farooq wrote:

Re: [algogeeks] Output of the code

2011-04-06 Thread Umer Farooq
The compiler doesn't want to get killed like poor mani, therfore it is giving a compiler error :P On Mon, Mar 28, 2011 at 10:43 AM, balaji a wrote: >

Re: [algogeeks] Output of the code

2011-04-06 Thread Umer Farooq
java: System.out.println("Hamara cricket sey kiya waasta yaaro! \nHamara tou qaumi khail Hockey hai!"); On Tue, Mar 29, 2011 at 2:29 PM, pacific :-) wrote: > ruby : > > puts"India will win the worldcup 2011" > > > On Mon, Mar 28, 2011 at 9:04 PM, shady wrote: > >> python 2.6 >> >> print 'India

Re: [algogeeks] Output of the code

2011-04-06 Thread Umer Farooq
btw, true is defined in cpp. On Mon, Mar 28, 2011 at 12:54 PM, Umer Farooq wrote: > The compiler doesn't want to get killed like poor > mani, > ther

Re: [algogeeks] Output of the code

2011-03-29 Thread pacific :-)
ruby : puts"India will win the worldcup 2011" On Mon, Mar 28, 2011 at 9:04 PM, shady wrote: > python 2.6 > > print 'India will win the World Cup 2010' > > > On Mon, Mar 28, 2011 at 8:45 PM, Praveen Kumar wrote: > >> Here is the correct program : >> >> #include >> using namespace std; >> >> int

Re: [algogeeks] Output of the code

2011-03-28 Thread shady
python 2.6 print 'India will win the World Cup 2010' On Mon, Mar 28, 2011 at 8:45 PM, Praveen Kumar wrote: > Here is the correct program : > > #include > using namespace std; > > int main() > { >while(true) >{ > cout<<"India will win the World Cup 2010"<} > >

Re: [algogeeks] Output of the code

2011-03-28 Thread Praveen Kumar
Here is the correct program : #include using namespace std; int main() { while(true) { cout<<"India will win the World Cup 2010" true is a keyword representing 1 and false as 0. The program will print the > line a single time. > > On Mon, Mar 28, 2011 at 11:13

Re: [algogeeks] Output of the code

2011-03-28 Thread Praveen Kumar
true is a keyword representing 1 and false as 0. The program will print the line a single time. On Mon, Mar 28, 2011 at 11:13 AM, balaji a wrote: > the code will give error as there is nothing called "true" defined. > > On Sun, Mar 27, 2011 at 10:38 PM, Umer Farooq wrote: > >> Hi, >> >> Can

Re: [algogeeks] Output of the code

2011-03-28 Thread pacific :-)
No no , you are all wrong.It will output : India will win the WorldCup 2011 On Mon, Mar 28, 2011 at 7:59 PM, Anurag atri wrote: > @Praveen : Excellent rply man ! Its clear that he never wanted to gain > anything out of that question . > > > On Mon, Mar 28, 2011 at 11:13 AM, balaji a wrote: > >>

Re: [algogeeks] Output of the code

2011-03-28 Thread Anurag atri
@Praveen : Excellent rply man ! Its clear that he never wanted to gain anything out of that question . On Mon, Mar 28, 2011 at 11:13 AM, balaji a wrote: > the code will give error as there is nothing called "true" defined. > > On Sun, Mar 27, 2011 at 10:38 PM, Umer Farooq wrote: > >> Hi, >>

Re: [algogeeks] Output of the code

2011-03-27 Thread balaji a
the code will give error as there is nothing called "true" defined. On Sun, Mar 27, 2011 at 10:38 PM, Umer Farooq wrote: > Hi, > > Can anyone tell me the output of the following code? > > #include > > int main() > { > .. if (true) > .. cout << "Pakistan will win the WorldCup

Re: [algogeeks] Output of the code

2011-03-27 Thread Gunjan Sharma
Yup that's right On Mar 28, 2011 8:30 AM, "Praveen Kumar" wrote: > Hi! > I don't know why you asked that question. > But, tell me if it is a C or C++ program. Anyhow, it will give compilation > whatever the compiler be. > Why?? cout is used in namespace 'std', if it is a C++ program iostream.h > w

Re: [algogeeks] Output of the code

2011-03-27 Thread Praveen Kumar
Hi! I don't know why you asked that question. But, tell me if it is a C or C++ program. Anyhow, it will give compilation whatever the compiler be. Why?? cout is used in namespace 'std', if it is a C++ program iostream.h won't work and if it is a C program, cout won't work. Pakistan doesn't seem to

[algogeeks] Output of the code

2011-03-27 Thread Umer Farooq
Hi, Can anyone tell me the output of the following code? #include int main() { .. if (true) .. cout << "Pakistan will win the WorldCup 2011\n"; return 0; } -- Umer -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group.

[algogeeks] output for optimal binary search tree

2010-10-10 Thread pre lak
Hi , Pls help me with the following question. Design an algorithm to print the output for an optimal binary search tree.. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsu

Re: [algogeeks] output

2010-06-12 Thread Rohit Saraf
I read that. But still it should not be compiled as per the standard. The latest GNU C/C++ compiler correctly fails to compile this -- Rohit Saraf Second Year Undergraduate, Dept. of Computer Science and Engineering IIT Bombay http://www.cse.iitb.ac

Re: [algogeeks] output

2010-06-12 Thread divya jain
sorry for the silly question i got rhe point.. @ rohit compiler is doing rite..read mahesh's explanatn On 13 June 2010 08:27, Rohit Saraf wrote: > This is very bad. Change your compiler if it compiles this stuff :) > > btw.. which compiler is it? > > Output for me : > ro...@rohit-laptop:~/dump$

Re: [algogeeks] output

2010-06-12 Thread Rohit Saraf
This is very bad. Change your compiler if it compiles this stuff :) btw.. which compiler is it? Output for me : ro...@rohit-laptop:~/dump$ gcc c.c c.c: In function ‘main’: c.c:14: error: incompatible types when assigning to type ‘char[20]’ from type ‘char *’ c.c:15: error: incompatible types when

Re: [algogeeks] output

2010-06-12 Thread Mahesh_JNU
Well As we know for copying the string we can can copy it as a simple variable as in case of address copying. when u r doing names[3] = names[4] , it means u r trying to copy it directly bt in the case of char *names[] , as it is the array of pointers so u can copy the address from one pointer to

[algogeeks] output

2010-06-12 Thread divya
#include int main() { char names[][20]={ "roshni", "manish", "sona", "baiju", "ritu" }; int i; char *t; t=names[3]; names[3]=names[4]; names[4]=t; for(i=0;i<=4;i++) printf("%s",names[i]); printf("\n"); return 0; } here i get l value required as error and if i replace char names[][2] with char *na

<    1   2   3