The basics are:
1) Be able to determine from code in one language what that code is doing. This requires an understanding of the syntax of the first language.
2) Write code that does the same thing in the second language. This requires knowledge of the syntax of the second language.
Answers
The basic is to learn both C and Java, probably...
But syntaxes are similar, particularly in the code snippet you show.
but i have a exam after 1 week how can i learn C language now? :/
I don't get it. Is your test about converting C code to Processing/Java??? :-??
It's not that hard
Did you do this:
http://www.learn-c.org/
Unfortunately this is not a C but a processing / Java forum
But there are of course further resources
Best might be to play around with small code pieces; do you have a C or C++ or C# program where you can write and run your code in?
The basics are: 1) Be able to determine from code in one language what that code is doing. This requires an understanding of the syntax of the first language. 2) Write code that does the same thing in the second language. This requires knowledge of the syntax of the second language.