Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8842273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:54:59+00:00 2026-06-14T10:54:59+00:00

In Steven Prata’s book "C Primer Plus", there’s a section on Type Conversions, wherein

  • 0

In Steven Prata’s book "C Primer Plus", there’s a section on Type Conversions, wherein "The basic rules are" section has stated in rule 1:

Under K&R C, but not under current C, float is automatically converted to double.

http://www.9wy.net/onlinebook/CPrimerPlus5/ch05lev1sec5.html

Could someone explain what but not under current C means? Are there versions of C that auto-convert and versions that don’t?

I’m trying understand if I have an expression that mixes floats and doubles, can I rely on C to promote floats to doubles when it’s evaluated?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T10:55:01+00:00Added an answer on June 14, 2026 at 10:55 am

    It must refer to the result of binary arithmetic operations of float * float format. In the pre-standard versions of C operands of such expressions were promoted to double and the result had double type.

    For example, here’s a quote from “C Reference Manual”

    If both operands are int or char, the result is int. If both are
    float or double, the result is double.

    In C89/90 already this behavior was changed and float * float expressions produce float result.

    • If either operand has type long double, the other operand is converted to long double
    • Otherwise, if either operand is double, the other operand is converted to double.
    • Otherwise, if either operand is float, the other operand is converted to float.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was reading Steven Sanderson's book Pro ASP.NET MVC Framework and he suggests using
I reading Steven Sanderson's book, Pro Asp.NET MVC 2 Framework. I'm on page 116
I've been working through the book Pro ASP.NET MVC 2 Framework by Steven Sanderson.
Is there a built in function or a function that someone has already written
After reading Steven Sanderson's book Pro ASP.NET MVC I am convinced about the benefits
There are two SQL statements. One is select count(*) from steventable where username='steven'; select
I was following Steven Sanderson's ' Pro ASP.NET MVC Framework ' book. On page
I'm trying to implement Steven Sanderson's WinsorControllerFactory from his pro Asp.Net MVC Framework book
I’m stuck in a reference book by Steven Sanderson/Adum Freeman Pro ASP .Net MVC
I am trying to make the programming challanges from the book written by Steven

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.