>WHATS WRONG WITH MY CODE?
its a simple problem to invert the order of a vector (C language), but somehow the return values are totally wrong:
>#include <stdio.h>
#include <stdlib.h>
int main ()
{
int vet[3],i;
printf("give 3 numbers:");
for(i=0;i<3;i++){
scanf("%d",&vet[i]);
}
printf("\n reverse order is: \n");
for(i=2;i>=0;i--){
printf("%d ",&vet[i]);
}
return 0;
}
>>7984181
>printf("%d ",&vet[i]);
you're printing the address of the ith element of vet
now delete your thread and fuck off back to /g/
>>7984185
holy fuck, thanks
>>7984181
>Background looks like it's moving
Wew lad
while(1)
{
;
}
>>7984181
unsigned char* program1[] = {
"2xor eax,eax",
"2or al,0x60",
"4mov rax,[gs:rax]",
"4mov rbx,[rax+3*8]",
"4add rbx,4*8",
>>7984181
>C
>Not C++
What the fuck is wrong with you?
>>7984181
/g/ actually takes homework problems. Post in /dpt/ on /g/ next time.
>>7984382
the only reason anyone should ever use C++ is for game development
ye fucking idiot
>>7984374
> not machine code
plebs
>>7984374
is there a quick way to convert this into machine code
also captcha thinks a limousine is a train i thought it was supposed to be smarter than that
>>7984438
>not a turing machine
plebs