#include stdio.h
#define PrintInt(expr) printf(%s : %d\n,#expr,(expr))
*int* FiveTimes(*int* a)
{
*int* t;
t *=* a**2 *+* a;
*return* t;
}
*int* main()
{
*int* a *=* 1, b *=* 2,c *=* 3;
PrintInt(FiveTimes(a));
PrintInt(FiveTimes(b));
8, 32, 96
On Sat, Feb 5, 2011 at 2:46 PM, priya mehta priya.mehta...@gmail.comwrote:
#include stdio.h
#define PrintInt(expr) printf(%s : %d\n,#expr,(expr))
*int* FiveTimes(*int* a)
{
*int* t;
t *=* a**2 *+* a;
*return* t;
}
*int* main()
{
*int*
because u not thinking of operator precedence :P :P
On Sat, Feb 5, 2011 at 2:52 PM, priya mehta priya.mehta...@gmail.comwrote:
why is this happening?
On Sat, Feb 5, 2011 at 2:51 PM, Manmeet Singh mans.aus...@gmail.comwrote:
8, 32, 96
On Sat, Feb 5, 2011 at 2:46 PM, priya mehta
guess the output
main()
{
int x=(1,024),y;
y=1,024;
printf(%d %d,x,y);
}
--
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 from this group, send
x is 20 for sure and y i m guessing to be 1 comma operator and 0 used for
octal constnts
On Sat, Feb 5, 2011 at 3:01 PM, radha krishnan radhakrishnance...@gmail.com
wrote:
guess the output
main()
{
int x=(1,024),y;
y=1,024;
printf(%d %d,x,y);
}
--
You received this
@ankit: how x is 20?
On Sat, Feb 5, 2011 at 4:46 PM, ankit sablok ankit4...@gmail.com wrote:
x is 20 for sure and y i m guessing to be 1 comma operator and 0 used for
octal constnts
On Sat, Feb 5, 2011 at 3:01 PM, radha krishnan
radhakrishnance...@gmail.com wrote:
guess the output
@priya u seems to be a beginner in c programming...
I would suggest u to go through Dennis richie.
Thanks and regards,
Gajendra Dadheech
On Sat, Feb 5, 2011 at 2:53 PM, Manmeet Singh mans.aus...@gmail.com wrote:
because u not thinking of operator precedence :P :P
On Sat, Feb 5, 2011
20,1 this would be output
Thanks and regards,
Gajendra Dadheech
Software Engineer-I (RD)
MediaTek India Technology
Work: 120-4343900(Ext. 276)
Mobile: +91-9540646145
-
Be the change you want to see in the world
x would be 20 as when we put zero in front of any number then this is taken
as octel number and value of 024 in decimal would be 20
Thanks and regards,
Gajendra Dadheech
On Sat, Feb 5, 2011 at 6:30 PM, Gajendra Dadheech gajju3...@gmail.comwrote:
20,1 this would be output
Thanks and
sure thanks:)
On Sat, Feb 5, 2011 at 6:26 PM, Gajendra Dadheech gajju3...@gmail.comwrote:
@priya u seems to be a beginner in c programming...
I would suggest u to go through Dennis richie.
Thanks and regards,
Gajendra Dadheech
On Sat, Feb 5, 2011 at 2:53 PM, Manmeet Singh
answer will depend on your compiler.
On Feb 5, 1:02 am, jagannath prasad das jpdasi...@gmail.com wrote:
*#includestdio.h
void main(void)
{
int a=10,b;
b=a++ + ++a;
printf(%d,%d,%d,%d,b,a++,a,++a);
}
*what is the answer?how are the function parameters passed on the stack?
--
You
Calculate size of a data type without using sizeof and without declaring any
variable of it
Thanks and regards,
Gajendra Dadheech
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
how does it ignore ' , ' for x but not for y ?. Can you explain what
happens if u give , in an int.
On Sat, Feb 5, 2011 at 6:34 PM, Gajendra Dadheech gajju3...@gmail.comwrote:
x would be 20 as when we put zero in front of any number then this is taken
as octel number and value of 024 in
#includestdio.h
long int k;
void fact(long int a[],long int n)
{
long int c=0,temp,i=0;
while(i=k)
{
temp=a[i]*n+c;
a[i]=temp%10;
c=temp/10;
i++;
}
while(c!=0)
{
a[i]=c%10;
c=c/10;
k++;
i++;
}
}
main()
{
@ankit:ans is 22 13 14 14 in gcc compiler.
On Sat, Feb 5, 2011 at 7:24 PM, Manish Verma monsieur@gmail.com wrote:
answer will depend on your compiler.
On Feb 5, 1:02 am, jagannath prasad das jpdasi...@gmail.com wrote:
*#includestdio.h
void main(void)
{
int a=10,b;
@Dave We may use fractions instead of pure double values.
--
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 from this group, send email to
Suppose we have the following statement: f(a) + f(b). The order of
evaluating the operads is compiler-dependent.
So, on compiler1 f(b) can be calculated first, f(a) at the final step.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to
Please ...
On 4 fév, 21:17, Glauben glauben...@gmail.com wrote:
Hello ,
who have single server queue simulation program c or c++ ?
Please
All the best .
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
Hi Gajendra,
See the following link
http://geeksforgeeks.org/forum/topic/huwaei-interview-question-for-software-engineerdeveloper-2-5-years-about-cpuzzles#post-18725
On Feb 5, 7:28 pm, Gajendra Dadheech gajju3...@gmail.com wrote:
Calculate size of a data type without using sizeof and without
yeah, plz explain the effect/use of comma operator.
On Sat, Feb 5, 2011 at 8:16 PM, nishaanth nishaant...@gmail.com wrote:
how does it ignore ' , ' for x but not for y ?. Can you explain what
happens if u give , in an int.
On Sat, Feb 5, 2011 at 6:34 PM, Gajendra Dadheech
i think juver has explained
On Feb 5, 9:34 pm, jagannath prasad das jpdasi...@gmail.com wrote:
@manish:can you explain with the example of a specific compiler...
On Sat, Feb 5, 2011 at 10:02 PM, jagannath prasad das
jpdasi...@gmail.comwrote:
@ankit:ans is 22 13 14 14 in gcc
but can nybody explain why the output is coming like this on gcc compiler??
On Sun, Feb 6, 2011 at 10:04 AM, Manish Verma monsieur@gmail.comwrote:
i think juver has explained
On Feb 5, 9:34 pm, jagannath prasad das jpdasi...@gmail.com wrote:
@manish:can you explain with the example of a
The comma operator (represented by the token ,) is a binary operator
that evaluates its first operand and discards the result, it then
evaluates the second operand and returns this value (and type). The
comma operator has the lowest precedence of any C operator, and acts
as a sequence point.
well, i can understand how x gets 20...but how y becomes 1???
--
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 from this group, send email to
since comma operator has the lowest precedence of any C operator
(y=1),024;
thus y=1
On Feb 6, 10:18 am, Balaji S balaji.ceg...@gmail.com wrote:
well, i can understand how x gets 20...but how y becomes 1???
--
You received this message because you are subscribed to the Google Groups
Algorithm
can anyone tell how to evaluate max(a,b) using abs() function...??
--
balaji ;-)
--
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 from this group, send email
max(a,b) = (abs(a+b)+abs(a-b))/2;
Dave
On Feb 5, 11:39 pm, Balaji S balaji.ceg...@gmail.com wrote:
can anyone tell how to evaluate max(a,b) using abs() function...??
--
balaji ;-)
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To
can anyone help..?
Suppose we have a string RGBBGBGR. we have to eliminate the couple (two
same chars adjacent to each other) recursively.
For example
RGBBGBGR -- RGGBGR--RBGR
--
balaji ;-)
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
A special type of tree is given, where all leaf are marked with L and others
are marked with N. every node can have 0 or at most 2 nodes. Trees preorder
is given, create tree from that traversal.
Thanks and regards,
Gajendra Dadheech
--
You received this message because you are subscribed to
@priya Because precedence of + operator is greater than operator . So
evaluation of expression a 2 + a will be
a(a+2)
On Sat, Feb 5, 2011 at 6:35 PM, priya mehta priya.mehta...@gmail.comwrote:
sure thanks:)
On Sat, Feb 5, 2011 at 6:26 PM, Gajendra Dadheech gajju3...@gmail.comwrote:
30 matches
Mail list logo