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

  • SEARCH
  • Home
  • 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 829139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:50:07+00:00 2026-05-15T03:50:07+00:00

In the following code, the const are defined using two different ways. const float

  • 0

In the following code, the const are defined using two different ways.

     const float KS = 0.001F;
     const float WW = 0.001f;

Is there any difference between F and f?

Revision 1:
If both are same then why both cases are allowed ?

  • 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-05-15T03:50:07+00:00Added an answer on May 15, 2026 at 3:50 am

    Nope, no difference between f and F in this case. It’s the special suffix for float literals, either works fine.

    With the long literals, there’s stylistic difference: l (lowercase) looks a lot like 1 (the number one). It’s recommended to use capital L for long literals.

    References

    • MSDN/C# Programmer’s Reference/float

      By default, a real numeric literal on the right-hand side of the assignment operator is treated as double. Therefore, to initialize a float variable use the suffix f or F.

    • MSDN/C# Programmer’s Reference/long

      You can also use the lowercase letter "l" as a suffix. However, this generates a compiler warning because the letter "l" is easily confused with the digit "1". Use "L" for clarity.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following code #include <iostream> using namespace std; int main() { const char* const
I've written the following code. I have a loop which iterates between two red
consider the following code: const QString& MyClass::getID(int index) const { if (i < myArraySize
I'm a bit confused what happened in the following code: const int e =
i have the following code below: const char* timeformat = %Y-%m-%d %H:%M:%S; const int
Consider the following code: struct Foo { Foo operator+(const Foo &rhs) const; // notice
Consider the following code: class A { public: A& operator=( const A& ); const
Consider the following code: struct Calc { Calc(const Arg1 & arg1, const Arg2 &
The following code snippet generates some warning messages when compiling: Cluster& Myclass::getCluster(const Point &p)
I have the following code that compiles and works well: template<typename T> T GetGlobal(const

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.