CSIAS
  • Blog
  • Contact
  • Login

Tag: casting operator

How to use casting operator in c language

Posted on May 26, 2023May 27, 2023 by Ajaj Khan

program to use casting operator in c language


#include<stdio.h>
int main()
{
    int x=5,y=2;
    float p,q;
    p=x/y;
    printf("p=%.2f\n",p);
    q=(float)x/y;
    printf("q=%f\n",q);
    return 0;
}

output


p=2.00
q=2.500000
Posted in C LanguageTagged casting operatorLeave a Comment on How to use casting operator in c language

Recent Posts

  • How to use JavaScript Array keys()
  • How to use JavaScript Array lastIndexOf()
  • How to use JavaScript Array fill()
  • How to use JavaScript Array indexOf()
  • ASCII TABLE IN LOWERCASE IN JAVASCRIPT

Recent Comments

    Archives

    • July 2023
    • June 2023
    • May 2023
    • July 2021
    • February 2021
    • January 2021
    • December 2020
    • October 2020
    • June 2020
    • March 2020
    • January 2020
    • November 2019

    Categories

    • ….
    • Bagging
    • Boosting
    • C Language
    • C Programming
    • Classification
    • Clustering
    • Decision Tree
    • Downloads
    • Ensemble Technique
    • How To
    • Java
    • JavaScript
    • linear regression
    • Logistic Regression
    • Machine Learning
    • News
    • Optimization
    • Random Forest
    • Regression
    • Schema.org
    • Stacking
    • Unsupervised Learning
    • WordPress

    Meta

    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org
    Proudly powered by WordPress | Theme: csias by Fahim Akhtar.