Int main(int argv char** argc){

int main(int argv char** argc){
int i = 1
i = ++i + i

if(i++ < ++i){
return i++
}
else{
return ++i
}
}


>90% of people cannot answer this question!

Other urls found in this thread:

youtube.com/watch?v=Y0xVLGssnwU
e-hentai.org/g/830582/56110a0138/
myredditvideos.com/
twitter.com/AnonBabble

You aint seen nothing yet. I bet you none of you could answer my question:

It won't compile because no comma or semicolons. Probably return 4 or 5, not sure if the order of the if expression.

you got your argc and argv backwards there, friendo

>(int argv char** argc)

COMPILE ERROR: expected a comma, got a retarded OP

GCC 7.2 AMD64:
; compiled with CFLAGS=-O3
proc main:
mov eax, 6
ret
endp

op here ive been writing a lot of html pls excuse my semicolons and typos

>i = ++i + i

The result isn't defined by standard C and is machine dependent.

Ignoring the syntax errors, the correct answer is undefined behavior

>call people retards
>I've been writing a lot of html pls excuse me

What is undefined behavior?

something only C programmers care about, i.e. not OP.

>Ignoring the syntax errors
even C compilers don't get this ignorant, satan.

that's because good luck knowing how that if statement compiles

% of people cannot answer this question!
>OP is one of them, which is why he made this thread

5

It returns 6, because i is evaluated before it is incremented.

you didn't ask a question
anyways your main returns 6

>char** argc instead of char **argc

brainlet

>missing commas
>argument count called "argv"
>argument vector called "argc"
OP has never written a line of C in his life, and made this post based on what he remembered from some "intro to C" tutorials, and got literally everything wrong.

yet you still can't answer the question from the OP
who's the REAL brainlet

>not noticing char **argc should say char **argv

>missing commas
I mean, semi colons, and that is the answer.

disingenuou

No it isn't.
Also, OP is literally missing commas, so yeah.
The answer is, it wont compile, because it's not valid C.

no where in the OP does she state it's meant to be C; you just assumed that

It's not valid "anything"

what are you even talking about lol
if you cant answer the question just leave
and no, complaing its not 'valid c' as if thats even a real thing

>if you cant answer the question just leave
You've yet to propose an answer yourself.
So, I guess we're both retards, for even replying to this thread.

i play the role of the teacher, you the student
heh, let's just say you failed

>The result isn't defined by standard C and is machine dependent.

ayylmao do not be stupid its the same as
i = 1 + ( i + i) ;

and on the i++ cases is
i= (1+i) + i;

>i play the role of the teacher
No you don't, you play the role of the idiot who won't even give an answer, because if you do, you will be called a retard, because op didn't actually pose a question.

get out of my class now

>anonymous narcissism
good one op, no one would hire you as any form of instructor or teacher.

keep replying, you still haven;t answered the question

neither have you

>if you cant answer the question just leave
What question would that be? OP doesn't specify one, and the obvious attempts to read one into the post run into equally obvious problems.

>flips the dicks
>shows his penis
>dances drawing circles with his penis
youtube.com/watch?v=Y0xVLGssnwU

>you still haven;t answered the question
what question?

not an argument
answer or leave

stfu cunt.

good one

not an argument
answer or leave

not an argument
answer or leave

Ask or leave.

not an argument
answer or leave

read the OP

>read the OP
not a question

You did not ask, so please leave.

the questions is contained within in the OP

No it isn't, there is some invalid code, and a statement, but no question.

Congrats on being a huge faggot OP

Anyway since this appears to be a thread about C, does anyone know where I can get a PDF of C Programming: A Modern Approach (2nd Edition) - K. N. King?

>is some invalid code,
how is it invalid
im just going to go out on a limb and assume that you are assuming its meant to be some C standard like all the other dumb dumbs in this thead

>how is it invalid
how is it valid?
>im just going to go out on a limb and assume that you are assuming its meant to be some C standard like all the other dumb dumbs in this thead
show me any language where it is valid, I dare you.

>OP trying weasel his way out of being a retard
Good thread.

>show me any language where it is valid, I dare you.

what? how is this an argument?

How is this or this?

that isn't an argument, that's me pointing out you're stupidity
btw you are an idiot

Nevermind I found it, libgen was being stupid earlier today.

Anyway anyone else /security/ here? I'm trying to get better at C programming/OS stuff.

>that isn't an argument
yeah, no shit, just like all your other posts

here's an argument:
everythinig you said itt is retarded therefore you are a retard

No, that's name calling.

Looks the same, but the difference between ++ and +1 is that the former updates its value. The undefined behavior is that C doesn't allow updating a variable more than once between sequence points, as it could fuck up some optimizations a compiler might assume.

the ++ syntax complicates readability, so I simply use += 1 whenever its needed.
problem solved.

>the ++ syntax complicates readability
No it doesn't.

but I proved it by using the evidence of your posts

No, you postulated, you have yet to provide any actual poof.

Cute

burden of proof is on you

the burden of actually asking a question is on you

its in the OP

where?
there is a code block and a statement, yet no question.

well according to my brain's compilation, the answer— if faggot OP had actually managed to write it correctly— is 6.
My computer also gave an answer of 6.
Since it's mAcHiNe DePeNdEnT i wonder what other people get.

e-hentai.org/g/830582/56110a0138/

>mAcHiNe DePeNdEnT
reddit

read it better

not a question, pose it better.

Thanks.

the question is there you just need to look within yourself

6-1*0+2/2
>90% of people cannot answer this question!

>still googling for the answer

it's just how you write out a mocking voice

go back

Looks like someone suddenly realized their mistake.

>e-hentai.org/g/830582/56110a0138/
Ran it and got 5.

neck yourself cunt

woah epic

What fucking question?
You posted code and made a statement.
This is the only other person in the thread that pointed out that you didn't even post the question.
The quesiton could've been "is this a stupid program?".

extreme brainlet

...

7

delet

i'm a brainlet
this guy is right

You've got nothing OP.
What's the exit code here?
int main(void){
int i = 0;
return i++ + ++i;
}

1

Imagine learning C only to answer pointless trivia questions online

>90 % can't answer this questions
sounds like one of these try not to laugh cancer challanges

>using argc and argv
there's literally no reason for this. they're irrelevant and unnecessary.
also if you can't figure that out on your own you're practically fucking braindead.

>90% of people can't spot obvious undefined behavior and rework their code
what a world

Multiple compilation errors.

2