error in c++ but runs in c....(tested in dev cpp)

On Sun, Aug 21, 2011 at 11:13 PM, Puneet Chawla
<[email protected]>wrote:

> @Naman :In codeblocks it's o/p is Interview....i exactly thought the same
> way but now i think that it depends upon compiler to compiler i don't know
> the reason behind it.
>
>
> On Sun, Aug 21, 2011 at 11:10 PM, Sanjay Rajpal <[email protected]> wrote:
>
>> but in the question, it is const char * to char *.
>>
>> Sanju
>> :)
>>
>>
>>
>> On Sun, Aug 21, 2011 at 10:38 AM, Naman Mahor <[email protected]>wrote:
>>
>>> const char* into char * is error not warning
>>> i hv run it on DEV c++;
>>>
>>>
>>> On Sun, Aug 21, 2011 at 11:01 PM, Sanjay Rajpal <[email protected]>wrote:
>>>
>>>>  i didnt run it, this concept is given in J.K.Chhabra book.
>>>>
>>>>
>>>> Sanju
>>>> :)
>>>>
>>>>
>>>>
>>>> On Sun, Aug 21, 2011 at 10:29 AM, Puneet Chawla <
>>>> [email protected]> wrote:
>>>>
>>>>> ohh srry.....i didn't run it...sry again..
>>>>>
>>>>>
>>>>> On Sun, Aug 21, 2011 at 10:58 PM, Sanjay Rajpal <[email protected]>wrote:
>>>>>
>>>>>>  it is a warning dear, not an error :)
>>>>>>
>>>>>>
>>>>>> Sanju
>>>>>> :)
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Sun, Aug 21, 2011 at 10:27 AM, Puneet Chawla <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> okk tht i knew bt my point is We are converting const char* into char
>>>>>>> * here means "Interview" const char* into char *
>>>>>>>
>>>>>>>
>>>>>>> On Sun, Aug 21, 2011 at 10:55 PM, Sanjay Rajpal <[email protected]>wrote:
>>>>>>>
>>>>>>>>  See precedence of ++ is greater than that of +=.
>>>>>>>>
>>>>>>>> so ii=7.
>>>>>>>> Now in the statement funct(ii+++"Campus Interview"), when +++ will
>>>>>>>> be parsed, it'll be ++ +, so
>>>>>>>> ii++ + "Campus Interview" will be 7 + "Campus Interview" , which is
>>>>>>>> equivalent to "Campus Interview"[7].
>>>>>>>>
>>>>>>>> Now to the function address passed starts from Interview.
>>>>>>>>
>>>>>>>> hence the result.
>>>>>>>> Sanju
>>>>>>>> :)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Sun, Aug 21, 2011 at 10:23 AM, Sanjay Rajpal 
>>>>>>>> <[email protected]>wrote:
>>>>>>>>
>>>>>>>>>  the o/p wil be Interview.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Sanju
>>>>>>>>> :)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Sun, Aug 21, 2011 at 10:20 AM, SuDhir mIsHra <
>>>>>>>>> [email protected]> wrote:
>>>>>>>>>
>>>>>>>>>>  funct(char* str)
>>>>>>>>>> {
>>>>>>>>>>     printf("%s\n",str);
>>>>>>>>>> }
>>>>>>>>>> main()
>>>>>>>>>> {
>>>>>>>>>>         static int ii = 1;
>>>>>>>>>>         int jj = 5;
>>>>>>>>>>         ii+=++jj;
>>>>>>>>>>         funct(ii+++"Campus Interview");
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>>>> Groups "Algorithm Geeks" group.
>>>>>>>>>> To post to this group, send email to [email protected].
>>>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>>>> [email protected].
>>>>>>>>>> For more options, visit this group at
>>>>>>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>   --
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "Algorithm Geeks" group.
>>>>>>>> To post to this group, send email to [email protected].
>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>> [email protected].
>>>>>>>> For more options, visit this group at
>>>>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> With regards
>>>>>>>   ............
>>>>>>> Puneet Chawla
>>>>>>> Computer Engineering Student
>>>>>>> NIT Kurukshetra
>>>>>>>
>>>>>>> --
>>>>>>>  You received this message because you are subscribed to the Google
>>>>>>> Groups "Algorithm Geeks" group.
>>>>>>> To post to this group, send email to [email protected].
>>>>>>> To unsubscribe from this group, send email to
>>>>>>> [email protected].
>>>>>>> For more options, visit this group at
>>>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>>>
>>>>>>
>>>>>>   --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "Algorithm Geeks" group.
>>>>>> To post to this group, send email to [email protected].
>>>>>> To unsubscribe from this group, send email to
>>>>>> [email protected].
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> With regards
>>>>>   ............
>>>>> Puneet Chawla
>>>>> Computer Engineering Student
>>>>> NIT Kurukshetra
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Algorithm Geeks" group.
>>>>> To post to this group, send email to [email protected].
>>>>> To unsubscribe from this group, send email to
>>>>> [email protected].
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>
>>>>
>>>>   --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Algorithm Geeks" group.
>>>> To post to this group, send email to [email protected].
>>>> To unsubscribe from this group, send email to
>>>> [email protected].
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected].
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> With regards
>   ............
> Puneet Chawla
> Computer Engineering Student
> NIT Kurukshetra
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to