Search
 
SCRIPT & CODE EXAMPLE
 

C

Increment & Decrement Operator in C language

int x;
int y;

x = 1;

y = ++x;      // value of x = 2, y = 2
y = x++;     // value of x = 3, y = 2

x = 3;

y = x--;      //value of x =2,y =3;
y = --x;      //value of x 1, y= 1;
Comment

C Increment and Decrement Operators

// Working of increment and decrement operators
#include <stdio.h>
int main()
{
    int a = 10, b = 100;
    float c = 10.5, d = 100.5;

    printf("++a = %d 
", ++a);
    printf("--b = %d 
", --b);
    printf("++c = %f 
", ++c);
    printf("--d = %f 
", --d);

    return 0;
}
Comment

PREVIOUS NEXT
Code Example
C :: matrix of string in c 
C :: c make list 
C :: free array in c 
C :: how to push node using linked list c 
C :: c local variable 
C :: open cv 
C :: install zoom on ubuntu 
Dart :: flutter appbar remove debug 
Dart :: flutter flotingactionbutton position 
Dart :: ElevatedButton flutter style 
Dart :: text fieldform color flutter 
Dart :: round container flutter 
Dart :: round to decimal places dart 
Dart :: change hint text color flutter 
Dart :: remove space from string dart 
Dart :: flutter launcher icon generate 
Dart :: get random color in flutter 
Dart :: flutter checkbox color 
Dart :: flutter file size 
Dart :: dart move item in list 
Dart :: dart try-catch 
Dart :: flutter check if platform is ios or andriod 
Dart :: floting action button small size 
Dart :: dart qoldiqni olish 
Dart :: flutter alertdialog actionsoverflowdirecation 
Dart :: delay in flutter 
Dart :: dart for each indexed 
Dart :: android studio causing blue screen 
Dart :: Flutter For In loop explained 
Dart :: convert date in flutter 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =