When I was looking for the expression v[i++]=i; why it is to define the behavior, I suddenly saw an explanation because the expression exists between ...
When I was looking for the expression v[i++]=i; why it is to define the behavior, I suddenly saw an explanation because the expression exists between ...
What I found is that postfix increment has higher precedence than prefix. Hence y=x+++x; y=(x++)+x; y=10 x=6 But when I execute the program :y=11,x= ...
I was shocked by the output of this... been coding in C for a few years now. Could someone explain a possible use case? Seems like it should be a comp ...
What would be the values after performing this operation? The code above gives me a segmentation fault. ...
I wrote the following C program to find the output for a+++b And I'm getting the output as 7 which is correct according to lexical analysis. Apart ...
Why is the output of the following program showing compile time error? Please explain "lvalue required" ...
In the below code when i print *ptr and **ptr1 both prints value of c i.e 4 everything is fine here, but after initialization of x with *ptr++, i r ...
I have a code which print pointer to const char, or I mean a string, recursively. My code works fine when I'm using += operator to call print() functi ...
I'm trying to fix a problem in my code since several days but I'm still stuck on it. I want to insert a value in a tab through a realloc but I have a ...
So when thinking about the output my thought process went like this : for the first if condition I thought that since its post increment operator , ...
output in this case is 1 output in this case is 0 I'm Not sure why get this different output in every case I mean why 1 in first case and 0 at s ...
So I have the following code snippet in C: When I ran the code, the output returned the value 33.0000. I was expecting the output to be 33.6667. I ...
What does count[s1.charAt(i) - 'a']++ do within the following for loop? I saw a similar question answered here but I'm still confused. I've never seen ...
I have a following code: I would like to return Janez! trough the recursive function. I don't have any errors when compiling. When I run the progra ...
I have a question that is raised from this discussion: C - modify the address of a pointer passed to a function Let's say I have the following code: ...
code The output is Since i is 1, I thought that the if statement satisfies 2% 2 == 0 and 2 should be output, but I don't know why 3. ...
Why is the output 25? Hi! I am aware that the above code will print 25. However, I would like to clarify on how x++ will make the statement be 8 + ...
Code Output (as expected) 1. The post increment operator (a++) has the highest priority in the table. So it will definitely execute before the a ...
I didn't understand the below question in LinkedIn's Java Assessment Test: Why does this code print 10 times "Hello world."? I know k++ means, fir ...
The answer I get without running the program is 6 (a=1, b=2, c=3). However, after you run the program the answer returns 8 (a=1, b=4, c=3). Please ...