Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C Language Tutorial (Basic to Advanced) Topics to be covered : Installation + Setup Chapter 1 - Variables, Data types + Input/Output Chapter 2 -

C Language Tutorial (Basic to Advanced) Topics to be covered : Installation + Setup Chapter 1 - Variables, Data types + Input/Output Chapter 2 - Instructions & Operators Chapter 3 - Conditional Statements Chapter 4 - Loop Control Statements Chapter 5 - Functions & Recursion Chapter 6 - Pointers Chapter 7 - Arrays Chapter 8 - Strings Chapter 9 - Structures Chapter 10 - File I/O Chapter 11 - Dynamic Memory Allocation Variables, Data Types + Input/Output (Chapter 1) V 1. First Program #include int main() { printf("Hello World"); return 0; } 2. Variables & Data Types + Constants & Keywords #include int main() { int number; int age; int price; return 0; } #include int main() { int age = 22; float pi = 3.14; char percentage = '%'; return 0; } 3. Comments #include //This program prints Hello World int main() { printf("Hello World"); return 0; } 4. Output #include int main() { int age = 22; float pi = 3.14; char percentage = '%'; printf("age is %d", age); printf("age is %f", pi); printf("age is %c", percentage); return 0; } 5. Input (Sum of 2 numbers) #include int main() { int a, b; printf("enter a "); scanf("%d", &a); printf("enter b "); scanf("%d", &b); printf("sum of a & b is : %d ", a+b); return 0; } 6. Practice Qs 1 (Area of Square) #include //area of square int main() { int side; scanf("%d", &side); printf("%d", side * side); return 0; } 7. Practice Qs 2 (Area of Circle) #include //area of square int main() { float radius; scanf("%f", &radius); printf("%f", 3.14 * radius * radius); return 0; }

Attachments:

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Recommended Textbook for

Core Concepts Of Accounting Information Systems

Authors: Nancy A. Bagranoff, Mark G. Simkin, Carolyn Strand Norman

11th Edition

9780470507025, 0470507020

Students also viewed these Programming questions

Question

Under what conditions are two qualitative variables independent?

Answered: 1 week ago