Skip to main content

Absolute value and Floating-point absolute value function in C Programming Language



Absolute value function in C Programming Language is abs(i), Its return the absolute valu of i. where  i  is any positive or negative  number. It is integer type function. The include file of abs(i) is stslib.h
Observe under program:

#include<stdio.h>

#include<stdlib.h>
int main(void)
{
int a;
scanf("%d",&a);
printf("%d",abs(a));
}
Here I use a integer number. Input it by scanf and print the Absolute value by abs() function.



Floating-point Absolute value function in C Programming Language is fabs(i), Its return the absolute valu of i. where  i  is any positive or negative  Floating-point number. It is double integer type function. The include file of fabs(i) is math.h
Observe under program:


#include<stdio.h>

#include<stdlib.h>
 int main(void)
{
float a;
scanf("%f",&a);
printf("%.2f",fabs(a));
}

Here I use a integer number. Input it by scanf and print the Floating-point Absolute value by abs() function.
If you have any problems tell me by comment. Thanks all.

Comments

  1. I actually enjoyed reading through this posting.Many thanks.
















    Function Point Estimation Training

    ReplyDelete
  2. best and useful sites and I like the sites.
    oracle training in chennai

    ReplyDelete
  3. • Looking for real-time training institute.
    ios training in chennai

    ReplyDelete
  4. I love to read your sections because your signature technique is too good, it is very very effective for all of us and I never get bored while learning your article because they become a more and more interesting from the starting lines until the end.Java Training in Chennai
    Java Training

    ReplyDelete
  5. I feel really happy to have seen your webpage and look forward to so many more entertaining times reading here. Thanks once more for all the details.digital marketing training in chennai

    ReplyDelete
  6. Very useful site and good explanation about C Program
    Oracle DBA training in pune

    ReplyDelete
  7. Thanks for sharing the c programming language.
    Oracle Online Training

    ReplyDelete
  8. Have you been thinking about the power sources and the tiles whom use blocks I wanted to thank you for this great read!! I definitely enjoyed every little bit of it and I have you bookmarked to check out the new stuff you post
    Data Science with Python training in chenni
    Data Science training in chennai
    Data science training in velachery
    Data science training in tambaram
    Data Science training in OMR
    Data Science training in anna nagar
    Data Science training in chennai
    Data science training in Bangalore

    ReplyDelete
  9. I am definitely enjoying your website. You definitely have some great insight and great stories. 
    python training institute in chennai
    python training in Bangalore
    python training in pune
    python online training

    ReplyDelete
  10. Read all the information that i've given in above article. It'll give u the whole idea about it.

    Blueprism training in tambaram

    Blueprism training in annanagar

    Blueprism training in velachery

    ReplyDelete
  11. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging…
    fire and safety course in chennai

    ReplyDelete
  12. Whoa! I’m enjoying the template/theme of this website. It’s simple, yet effective. A lot of times it’s very hard to get that “perfect balance” between superb usability and visual appeal. I must say you’ve done a very good job with this.

    Selenium Interview Questions and Answers

    Best Selenium Training in Chennai | Selenium Training Institute in Chennai | Besant Technologies

    Selenium Training in Bangalore | Best Selenium Training in Bangalore

    Free Selenium Tutorial |Selenium Webdriver Tutorial |For Beginners




    ReplyDelete
  13. Anyhow I am here now and would just like to say thanks a lot for a tremendous post and an all-round exciting blog
    iosh course in chennai

    ReplyDelete
  14. Nice blog!! I really got to know many new tips by reading your blog. Thank you so much for a detailed information! It is very helpful to me. Kindly continue the work.

    French Class in Mulund
    French Coaching in Mulund
    French Classes in Mulund East
    German Classes in Mulund
    German Language Classes in Mulund
    German Classes in Mulund West
    German Coaching Center near me

    ReplyDelete
  15. Thanks for sharing this informative blog. I have read your blog and I gathered some valuable information from this
    blog. Keep posting.

    Education
    Technology

    ReplyDelete

Post a Comment

Give your valuable Comment...