100% found this document useful (1 vote)
94 views2 pages

Similarities of C To Java

C and Java share similarities in syntax like comments, variable declarations, if/else statements, for loops, while loops, and function definitions. C differs from Java in that C does not support object-oriented programming and uses structs instead of classes, allows direct pointer manipulation, and uses printf and scanf functions for input/output rather than object-oriented approaches.

Uploaded by

Soo Lian Kei
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
94 views2 pages

Similarities of C To Java

C and Java share similarities in syntax like comments, variable declarations, if/else statements, for loops, while loops, and function definitions. C differs from Java in that C does not support object-oriented programming and uses structs instead of classes, allows direct pointer manipulation, and uses printf and scanf functions for input/output rather than object-oriented approaches.

Uploaded by

Soo Lian Kei
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Similarities of C to java

/* Comments */
Variable declarations
if / else statements
for loops
while loops
function definitions (like methods)
Main function starts program

Differences between C and java


C does not have objects
There are structures
C is a functional programming language
C allows pointer manipulation
Input / Output with C
Output with printf function
Input with scanf function

You might also like