100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Presentation C/C++ (Programming) CA$22.16   Add to cart

Presentation

Presentation C/C++ (Programming)

 2 views  0 purchase

Hey there! I’m linking my personally made c/c++ language codes in this file. This file contains plenty of codes and their descriptions which is easily understandable and does not involve any errors! Note!!! These codes are only for “embarcadero dev-c++ 6.3” and only supported on this softwa...

[Show more]

Preview 4 out of 54  pages

  • December 5, 2022
  • 54
  • 2022/2023
  • Presentation
  • Unknown
All documents for this subject (2)
avatar-seller
Yadwinder1234
INTRODUCTION of C Language
C is a programming language. It is also known as middle level a processor language. This
language was design for developing efficience, economical, portable system and
application software program.
It is as sensitive language.
It is developed by Denis Ritchie in 1972 at AT & TS Bell Labs of USA.

FEATURES OF C Language:-
1. It is very efficient and have fast execution speed.
2. C language has more data types than other languages.
3. It has 40 keywords.
4. C language program highly portable.
5. In it , you can take 0-50 thousand variables in single program
depending on the size in main memory.
6. It is a structural programming.
7. It is very simple to learn to use.

TYPES OF LANGUAGE:-

1. Machine Level Language or binary Language
2. Assembly language

Program in Assembler Program in m/c
assembly language language


3. High Level Language: - C++, java, VB, C# etc.
Program in high Compiler Program in m/c
level language language



STEPS TO LEARN ENGLISH: -
Alphabets words sentences paragraphs


Now The Steps in Learning C Language: -

Alphabets, digits, Constant, variables, Instructions Program
special symbols keywords
VARIABLES:-
It is the name to given to memory location where some data or value is stored. In C
language variable must be declared before it can be used. Variables can declared at start

,of any block of code. Values of the variables can be change during the execution of the
program.

RULES FOR DECLARING VARIABLES:-
1. The name of the variable must be starting an alphabet.
2. The variable name should not have any space in between.
3. All the variable name must be separated by comma (,).
4. It should not be a keyword.
5. The length of variable name should not be normally more than 8
characters.
6. Upper and lower case matter in variable.

KEYWORDS
Keywords are special words where meaning is already defined to the compiler.
Keywords cannot be used as variables or identifiers. C language has 40 keywords. Some of
them are the following:-
Break while char continue

Default do else float

Goto if int return

DATA TYPES:-
C language becomes powerful with the help of data types. Data types describe the type or
characteristics of variables or data.

SPECIFIC DATA TYPE VALUES:-
Data type Format Bytes of Range Value
String memory
Int %d 2 -32768-32767 843
Float %f 4 -3.4e38- 45.758
3.4e38
Char %c 1 -128-127 A
String %s 2 --- “aman”

What ‘s int main()?
There are many variations of main()function, but now a days it's a standard that we should return
some value (an integer value) to the calling/parent function. Since main()calls by the operating
system at the time of program's execution, returned value reaches to the operating system which
indicates that function/ program is executed successfully or not. So we should use this variation of
main()function but we really don’t know what operating system does with returned value?

What ‘s return 0?

,It is not necessary that every time you should use return 0 to return program's execution
status from the main()function.



A SIMPLE PROGRAM IN C LANGUAGE:-
#include<stdio.h>

int main()
{ clrscr(); printf(“HELLO”);
printf(“WELCOME IN C”);
return 0;
}
TO PRINT THE INTRODUCTION OF THE STUDENT:-
#include<stdio.h>

int main()
{
printf(“name”); printf(“\nclass”);
printf(“\nschool”);
printf(“\nplace”); return
0;
}

SIMPLE COLORING PROGRAM:-
#Include<stdio.h>
#include<stdlib.h>
Int main()
{
system(“color E4”);
printf(“golden”);
return 0;
}



0 = Black 8 = Gray
1 = Blue 9 = Light Blue
2 = Green A = Light Green
3 = Aqua B = Light Aqua
4 = Red C = Light Red
5 = Purple D = Light Purple

, 6 = Yellow E = Light Yellow
7 = White F = Bright White




OPERATORS
An operator is a symbol which operates on a variable or value. We can define operators as
symbols that help us to perform specific mathematical and logical computations on
operands or variables.
c=a+b; a and b is
operands or variables and “+” is a operator.
1. Unary operator:- unary operators work or operate with a single operand.
Examples: a++;
a--; --a;
++a;
2.Binary operators:- Binary operators that operate or work with two operands are
binary operators.
Examples:- a+b;
a<b ;
3.Ternary operator:- Ternary operator is an operator that takes three operands.
Example:- condition?:result1:result2;


PROGRAM TO ADD, subtract, multiply & divide 2 NUMBERS
#include<stdio.h>

int main()
{
int a,b,c;
a=100; b=20;
c=a+b; printf("\n\n addition is : %d",c);
c=a-b; printf("\n\n subtraction is : %d",c);
c=a*b; printf("\n\n multiplication is : %d",c);
c=a/b; printf("\n\n division is : %d",c);

return 0; }

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller Yadwinder1234. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for CA$22.16. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

72042 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
CA$22.16
  • (0)
  Add to cart