HI, I'm seeking for a source for learning c-aps and i don get any valuable
ones. Can anyone plz suggest me or share the valuable sources u know. Thank
u in anticipation
--
radhika .. :)
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
T
Hi all, as i find it hard to find a site that has a collection of non
obvious or fairly hard c aps sites anywhere, i seek help here. plz post if
u find any source proving to be useful.
--
Cheers,
Vicky
--
You received this message because you are subscribed to the Google Groups
"Algorithm
This depends on how the compiler evaluates the actual parameters and
push to the stack when printf is called.
this is totally depeding on the compiler architecture [ basically
implemetion of activation record in intermediate code genaration
phase, read intermidiate language and virtual machine @ co
thanks ppl :)
On Mon, Jul 18, 2011 at 3:59 PM, schrodinger <6fae1ce6347...@gmail.com>wrote:
> AFAIK, official answer is "due to undefined behavior".
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To view this discussion on the web
AFAIK, official answer is "due to undefined behavior".
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/EAWuaDE1CIcJ.
To post to this group, send email to al
@keyan
i examined many times in ubuntu that it delays the o/p of pre-increment
:)
but in dev C++ o/p is as given by atul
On Mon, Jul 18, 2011 at 3:15 PM, keyan karthi wrote:
> @boobal
> can u pls elaborate on "sequence points"
> @atul
> i compiled this in ubuntu
>
>
> On Mon, Jul 18, 2011 at 3:13
@boobal
can u pls elaborate on "sequence points"
@atul
i compiled this in ubuntu
On Mon, Jul 18, 2011 at 3:13 PM, Boobal Subramaniyam wrote:
> sequence points...
>
>
> On Mon, Jul 18, 2011 at 3:11 PM, Amol Sharma wrote:
>
>> it's not defined in the standard.unpredictable behaviour !!
>> -
sequence points...
On Mon, Jul 18, 2011 at 3:11 PM, Amol Sharma wrote:
> it's not defined in the standard.unpredictable behaviour !!
> --
>
>
> Amol Sharma
> Third Year Student
> Computer Science and Engineering
> MNNIT Allahabad
>
>
>
>
> On Mon, Jul 18, 2011 at 2:36 PM, keyan karthi
>
it's not defined in the standard.unpredictable behaviour !!
--
Amol Sharma
Third Year Student
Computer Science and Engineering
MNNIT Allahabad
On Mon, Jul 18, 2011 at 2:36 PM, keyan karthi wrote:
> #include
> using namespace std;
>
> int main()
> {
> int p=1;
> printf("%d %d %d %d",++p,p
In dev C++ output is coming 5 3 2 2
On Mon, Jul 18, 2011 at 2:36 PM, keyan karthi wrote:
> #include
> using namespace std;
>
> int main()
> {
> int p=1;
> printf("%d %d %d %d",++p,p++,p++,++p);
> }
>
> output : 5 3 2 5
>
> --
> You received this message because you are subscribed to the Google G
#include
using namespace std;
int main()
{
int p=1;
printf("%d %d %d %d",++p,p++,p++,++p);
}
output : 5 3 2 5
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe f
On Fri, May 20, 2011 at 3:19 PM, siva viknesh wrote:
>
> main()
> {
> int i = 257;
> int *iPtr = &i;
> printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) );
> }
> Answer:
> 1 1
>
i = 10001
first case *((char *)iPtr) cast to char 8 bits, discard first bit
0001 ==> 1
second *((char *)iPtr+1
hi
#include
main()
{
int a=2,*f1,*f2;
f1=f2=&a;
*f2+=*f2+=a+=2.5;
printf("\n%d %d %d",a,*f1,*f2);
}
for this code in code blocks IDE got 8 8 8 as op
in http://ideone.com/ok850 got 12 12 12
in 175 c aps pdf it has been given as 16 16 16 as
ou
main()
{
int i = 257;
int *iPtr = &i;
printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) );
}
Answer:
1 1
main()
{
int i = 258;
int *iPtr = &i;
printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) );
}
Answer:
2 1
..can anybody explain how??
--
Regards,
$iva
--
You received this message because y
the printf function returns 1 when it prints a string..
for (1;1&&i--;1)
{
printf("bat");
}
note that i=2 has been cunningly initialized before. and the decrement of i
has been done in middle expression of the for loop
hence, actually its like
for(;i--;)
{
}
how many times will this execute? Twice
#include
int main()
{
int i=2;
for(printf("cat ");printf("rat ")&&i--;printf("mat "))
{
printf("bat ");
}
}
ouput : cat rat bat mat rat bat mat rat
can anybody plz explain how we get this output??
--
Regards,
$iva
--
You received this message because you are subscribed to the G
the evalution will be done from right to left in printf
statement..so ++x will be evaluted and then x++.may be the out
put is 6 and 6 i think
On 13 December 2010 22:39, siva viknesh wrote:
> #include
> int main()
> {
> int x = 5;
> printf("%d %d", x++, ++x);
>
> return 0;
>
> }
>
#include
int main()
{
int x = 5;
printf("%d %d", x++, ++x);
return 0;
}
for this output is "6 7" ... how evaluation proceeds??
--
Regards,
$iva
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to algo
18 matches
Mail list logo