Re: [ilugd] I am unable to understand this C code

2010-02-12 Thread rakesh kumar
On Fri, Feb 12, 2010 at 1:46 AM, Ankit Chaturvedi ankit.chaturv...@gmail.com wrote: On Thu, Feb 11, 2010 at 7:16 PM, rakesh kumar kumar3...@gmail.com wrote: On Thu, Feb 11, 2010 at 3:33 PM, Ankit Chaturvedi ankit.chaturv...@gmail.com wrote: On Sun, Feb 7, 2010 at 5:05 PM, SUBODH

Re: [ilugd] I am unable to understand this C code

2010-02-11 Thread Ankit Chaturvedi
On Thu, Feb 11, 2010 at 7:16 PM, rakesh kumar kumar3...@gmail.com wrote: On Thu, Feb 11, 2010 at 3:33 PM, Ankit Chaturvedi ankit.chaturv...@gmail.com wrote: On Sun, Feb 7, 2010 at 5:05 PM, SUBODH ROHILLA subodh.rohi...@gmail.com wrote: I have tried compling it with g++ and also with

Re: [ilugd] I am unable to understand this C code

2010-02-07 Thread Prashant Batra
On Sat, Feb 6, 2010 at 4:29 PM, rakesh kumar kumar3...@gmail.com wrote: Hi all,         Today while studying a book i just saw the following lines of code: int main(void) {  int printf(const char *n,...); The local declaration(prototype of the function)  int a=1;  printf(abcdef); Calls the

Re: [ilugd] I am unable to understand this C code

2010-02-07 Thread SUBODH ROHILLA
I have tried compling it with g++ and also with g++ -Wall , but it gives no error warning message. It runs smoothly On Sun, Feb 7, 2010 at 4:51 PM, Prashant Batra prashant0...@gmail.comwrote: On Sat, Feb 6, 2010 at 4:29 PM, rakesh kumar kumar3...@gmail.com wrote: Hi all, Today while

Re: [ilugd] I am unable to understand this C code

2010-02-06 Thread sudhir kumar
On Sat, Feb 6, 2010 at 4:29 PM, rakesh kumar kumar3...@gmail.com wrote: Hi all,         Today while studying a book i just saw the following lines of code: int main(void) {  int printf(const char *n,...); This is pretty obvious and is declaration of a local function.  int a=1;  

Re: [ilugd] I am unable to understand this C code

2010-02-06 Thread Ashish SHUKLA
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 rakesh kumar writes: Hi all, Today while studying a book i just saw the following lines of code: int main(void) { int printf(const char *n,...); prototype of the printf(3) function. int a=1; printf(abcdef); return 0; }

Re: [ilugd] I am unable to understand this C code

2010-02-06 Thread rakesh kumar
* I think that GATE questions are generally being asked on the basis of logic and not depend how intelligent our compiler is*. I never experienced that any GATE question have been asked based other than the logic. Sudhir, as you wrote that at first time in the third line, when printf

Re: [ilugd] I am unable to understand this C code

2010-02-06 Thread Raj Mathur
On Saturday 06 Feb 2010, Ashish SHUKLA wrote: [snip] You include stdio.h to include the prototypes of the functions, but in above case you already declared the prototype of the function which you invoked, so no need to include the header file. Well, you also include it to define the FILE