I uderstand these 3 questions are very basic but I am having

I uderstand these 3 questions are very basic but I am having problems understanding the verbage. I am ADHD and ran out of prescription, therefore having a really thought time understing simple terms....ugh really frustrated. SOS please, this is due tomorrow and is like I am starring at a blank page.

Solution

1)

First part.

a = 123

x = 0.4

sym = 5

This is because the inputs are chained, a is of type integer which takes only integer values, so from 123.4, 123 is extracted to a and the left over 0.4 will be in buffer which gets assigned to x, in the buffer the next character is 5 so it gets assigned to sym.

Second part.

a = 5

x = 23.4

sym = 1

Explanation:

given input 123.4 5 X

sym can store only one character so 1 will be assigned to sym and 23.4 will be left over in buffer.

x will have 23.4, as 23.4 is in the buffer

a will get 5 as 5 will be in next buffer.

2)

!done || y!= 6 --> true, since done is false !done is true, true or flase always returns in true

x<4 && y< 10 --> false, since x=8<4 is false, false and anything returns false

2<=x<=5 --> true, since 2<x(x = 8)

3)

w = 6

z = 5

x = 9

y = 9

w++ is post increment so first 5 will be assigned to z and increment will happen after assinment. so z has 5 and w has 6.

++x is pre increment, incrementation happens before assignment. so y has 9 and x also has 9.

I uderstand these 3 questions are very basic but I am having problems understanding the verbage. I am ADHD and ran out of prescription, therefore having a reall

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site