KAUDOO C++ DANNE ..!!!! LOKU UDAWWAK

haarshlife

Member
Jul 17, 2007
5,919
15
0
INSIDE ME... !!!
Evaluate each statements and list the final values of variables used @ the end of each & every statement considering each as an independant statement.

int i=9, j=8, k=3, l,m ;

a) m=i++
b) l=j++
c) m=++k%--j*++i
d) l=j++*--i
e) m=++j+i

LOKU UDAWWAK (poddak explain parakuth danna ayyala )
 

ra20002

Member
Jul 4, 2008
2,585
21
0
http://tutorialfordummies.tk/
i++ means assign and increment that means m=9 and i=10

b) j=9 l=8

c) ++k means increment and then assign
m=4%8*11 (cz nw j=9 in b and i=10 in a)
m=44 (nw j=8 i=11 k=4)

d) l=8*10 (nw j=9 i=10)
l=80

e) m=10+10
m =20
 

haarshlife

Member
Jul 17, 2007
5,919
15
0
INSIDE ME... !!!
ra20002 said:
i++ means assign and increment that means m=9 and i=10

b) j=9 l=8

c) ++k means increment and then assign
m=4%8*11 (cz nw j=9 in b and i=10 in a)
m=44 (nw j=8 i=11 k=4)

d) l=8*10 (nw j=9 i=10)
l=80

e) m=10+10
m =20
ela thnXX bro btw thawa ekak thiyenawa .....:) ekatath podi sup ekak denna puluwanda machan

x= (3*9*(3+(9*3/(3))))

x = 2%2+2*2-2/2
 

ra20002

Member
Jul 4, 2008
2,585
21
0
http://tutorialfordummies.tk/
haarshlife said:
ela thnXX bro btw thawa ekak thiyenawa .....:) ekatath podi sup ekak denna puluwanda machan

x= (3*9*(3+(9*3/(3))))

x = 2%2+2*2-2/2
welcome buddy

x=(3*9*(3+(9*3/(3))))
x=(3*9*(3+(9*1)))
x=(3*9*(3+9))
x=(3*9*12)
x=(27*12)
x=324


first solve the inside ()


x=2%2+2*2-2/2
x=0+4-1
x=3

operator sequence
evalute left 2 right * % /
tht means wht ever the operator in left(out of those 3 operators) it evalute first cz they hve the same priority..
 

smother

Well-known member
  • Jan 27, 2009
    19,902
    1,483
    113
    36
    Six Feet Under
    haarshlife said:
    Evaluate each statements and list the final values of variables used @ the end of each & every statement considering each as an independant statement.

    int i=9, j=8, k=3, l,m ;

    a) m=i++
    b) l=j++
    c) m=++k%--j*++i
    d) l=j++*--i
    e) m=++j+i

    LOKU UDAWWAK (poddak explain parakuth danna ayyala )

    machoo oke tiyenne value eka assign karanna,
    i++ kiyanne execute wenawa nxt line ekeedi (increse by 1)
    ++i kiyanne same line ekeedi add wenawa
     

    haarshlife

    Member
    Jul 17, 2007
    5,919
    15
    0
    INSIDE ME... !!!
    ra20002 said:
    welcome buddy

    x=(3*9*(3+(9*3/(3))))
    x=(3*9*(3+(9*1)))
    x=(3*9*(3+9))
    x=(3*9*12)
    x=(27*12)
    x=324


    first solve the inside ()


    x=2%2+2*2-2/2
    x=0+4-1
    x=3

    operator sequence
    evalute left 2 right * % /
    tht means wht ever the operator in left(out of those 3 operators) it evalute first cz they hve the same priority..
    ela machan thnXX godak pin machan loku udawwak