0% found this document useful (0 votes)
2 views3 pages

Introduction To C

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
0% found this document useful (0 votes)
2 views3 pages

Introduction To C

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/ 3

Introduction to Java Programming

What is C?

C is a general-purpose, procedural programming language developed in the early 1970s by Dennis Ritchie. It

is widely used for system programming, including operating systems, embedded systems, and

high-performance applications.

Basic Structure of a C Program

#include <stdio.h>

int main() {

printf("Hello, World!\n");

return 0;

Data Types in C

- int: Integer

- float: Floating-point number

- double: Double precision floating-point

- char: Character

Variables and Operators

int a = 5;

float b = 2.5;

char c = 'A';
Introduction to Java Programming

// Arithmetic operators: +, -, *, /, %

// Comparison operators: ==, !=, >, <, >=, <=

Control Structures

if (a > b) {

// code

} else {

// other code

for (int i = 0; i < 10; i++) {

// loop code

Functions in C

int add(int x, int y) {

return x + y;

int main() {

int result = add(3, 4);

printf("%d", result);

return 0;
Introduction to Java Programming

Pointers and Memory

int x = 10;

int *p = &x;

printf("%d", *p); // prints 10

// Pointers are used for dynamic memory, arrays, and functions.

Useful Links and Resources

- [C Programming on GeeksforGeeks](https://www.geeksforgeeks.org/c-programming-language/)

- [C Tutorial - Tutorialspoint](https://www.tutorialspoint.com/cprogramming/)

- [C Reference - cplusplus.com](https://cplusplus.com/doc/tutorial/)

You might also like