As Rob mentioned, you probably just want to print the float to 1 decimal place. In this case, you can do something like the following:

Copy#include <stdio.h>
#include <stdlib.h>

int main()
{
  float conver = 45.592346543;
  printf("conver is %0.1f\n",conver);
  return 0;
}

If you want to actually round the stored value, that's a little more complicated. For one, your one-decimal-place representation will rarely have an exact analog in floating-point. If you just want to get as close as possible, something like this might do the trick:

Copy#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main()
{
  float conver = 45.592346543;
  printf("conver is %0.1f\n",conver);

  conver = conver*10.0f;
  conver = (conver > (floor(conver)+0.5f)) ? ceil(conver) : floor(conver);
  conver = conver/10.0f;

  //If you're using C99 or better, rather than ANSI C/C89/C90, the following will also work.
  //conver = roundf(conver*10.0f)/10.0f;

  printf("conver is now %f\n",conver);
  return 0;
}

I doubt this second example is what you're looking for, but I included it for completeness. If you do require representing your numbers in this way internally, and not just on output, consider using a fixed-point representation instead.

Answer from Matt J on Stack Overflow
Discussions

How to round a floating point number in the most time efficient way in C in a 10 kHz periodic interrupt?
Why is the value floating point in the first case? More on reddit.com
๐ŸŒ r/embedded
54
50
March 15, 2024
Rounding in C
Have you considered simply trying the code out? More on reddit.com
๐ŸŒ r/C_Programming
37
0
May 8, 2024
๐ŸŒ
Scaler
scaler.com โ€บ home โ€บ topics โ€บ c round() function
C round() Function - Scaler Topics
March 27, 2024 - The C round() function is one of ... The round() function in C returns the nearest integer value (rounded value) of the given float, integer, or double number based on the decimal part of the number....
๐ŸŒ
Microsoft Learn
learn.microsoft.com โ€บ en-us โ€บ cpp โ€บ c-runtime-library โ€บ reference โ€บ round-roundf-roundl
round, roundf, roundl | Microsoft Learn
July 9, 2025 - The round functions return a floating-point value that represents the nearest integer to x. Halfway values are rounded away from zero, regardless of the setting of the floating-point rounding mode.
๐ŸŒ
Quora
quora.com โ€บ How-do-you-handle-the-rounding-of-decimal-places-in-C-C-float-rounding-development
How to handle the rounding of decimal places in C (C, float, rounding, development) - Quora
... B. Sc. in Computer Science, ... floating-point math library has a function called round(), which rounds a double floating-point value to the nearest integer....
๐ŸŒ
Cplusplus
cplusplus.com โ€บ reference โ€บ cmath โ€บ round
Round
double round (double x); float round (float x);long double round (long double x); double round (T x); // additional overloads for integral types ... Returns the integral value that is nearest to x, with halfway cases rounded away from zero.
Find elsewhere
๐ŸŒ
O'Reilly
oreilly.com โ€บ library โ€บ view โ€บ c-in-a โ€บ 0596006977 โ€บ re199.html
round C99 - C in a Nutshell [Book]
December 16, 2005 - Process Control16.11.1. Communication with the Operating System16.11.2. Signals16.12. Internationalization16.13. Nonlocal Jumps16.14. Debugging16.15. Error Messages ... #include <math.h> doubleround( double x ); float roundf( float x ); long double roundl( long double x );
Authors ย  Peter PrinzTony Crawford
Published ย  2005
Pages ย  618
๐ŸŒ
Quora
quora.com โ€บ How-does-one-round-floats-to-the-nearest-integer-in-C
How does one round floats to the nearest integer in C? - Quora
Answer (1 of 4): add 0.5 [code]#include int main(){ int i; i = 12.34; printf("%d\n", i); // 12 i = 12.34 + 0.5; printf("%d\n", i); // 12 i = 45.67; printf("%d\n", i); // 45 i = 45.67 + 0.5; printf("%d\n", i); // 46 } [/code]
๐ŸŒ
Fresh2Refresh
fresh2refresh.com โ€บ home โ€บ c programming tutorial โ€บ c โ€“ arithmetic functions โ€บ c โ€“ round() function
C round() function | C Arithmetic functions | Fresh2Refresh
May 21, 2024 - C round() function:round( ) function in C returns the nearest integer value of the float/double/long double argument passed to this function.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ c language โ€บ round-function-in-c
round() Function in C - GeeksforGeeks
July 5, 2024 - C round() is a built-in library function that rounds a floating-point number to the nearest integer. If the fractional part of the number is 0.5 or greater, the argument is rounded away from zero.
๐ŸŒ
OpenGenus
iq.opengenus.org โ€บ rounding-and-truncating-numbers-in-c
Rounding and Truncating numbers using math.h in C
November 10, 2019 - If we pass float number as an argument, the syntax is: ... #include <stdio.h> #include <math.h> int main() { printf("lroundf(+2.72) gives = %d\n", lroundf(2.72)); } ... #include <stdio.h> #include <math.h> int main() { printf("lround(+5.81) gives = %d\n", lround(5.81)); } ... #include <stdio.h> #include <math.h> int main() { printf("lroundl(+2.64) gives = %d\n", lroundl(2.64)); } ... If arg has type long double, roundl, lroundl, llroundl is called.
๐ŸŒ
Reddit
reddit.com โ€บ r/c_programming โ€บ rounding in c
r/C_Programming on Reddit: Rounding in C
May 8, 2024 -

I have a question when it comes to rounding in C. Does it round up or down at .5? If it does round up, then does that mean that the smallest value of k in the code below can only be 1?

 int main()
{
    int k = 13;
    int i;
    for (i = 0; i < 8; i++) {
        printf("%d", (k%2));
        k >>= 1;
    }
    printf("%n");
}

๐ŸŒ
GNU
gnu.org โ€บ software โ€บ libc โ€บ manual โ€บ html_node โ€บ Rounding-Functions.html
Rounding Functions (The GNU C Library)
July 11, 2018 - Preliminary: | MT-Safe | AS-Safe | AC-Safe | See POSIX Safety Concepts. The trunc functions round x towards zero to the nearest integer (returned in floating-point format).
๐ŸŒ
NxtWave
ccbp.in โ€บ blog โ€บ articles โ€บ float-in-c
Float in C Programming | Definition, Syntax & Examples
When working with float in C, these functions help control precision and handle decimal values efficiently. The round() method rounds a floating-point number to the closest integer.
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ c_standard_library โ€บ c_function_round.htm
C library - round() function
The C library round() function can be used to calculate the floating-point into the nearest integer. This function is a part of C99 standard and defined under the header math.h.
๐ŸŒ
Yale University
cs.yale.edu โ€บ homes โ€บ aspnes โ€บ pinewiki โ€บ C(2f)FloatingPoint.html
C/FloatingPoint
If you mix two different floating-point types together, the less-precise one will be extended to match the precision of the more-precise one; this also works if you mix integer and floating point types as in 2 / 3.0. Unlike integer division, floating-point division does not discard the fractional part (although it may produce round-off error: 2.0/3.0 gives 0.66666666666666663, which is not quite exact). Be careful about accidentally using integer division when you mean to use floating-point division: 2/3 is 0.
๐ŸŒ
Cppreference
en.cppreference.com โ€บ w โ€บ c โ€บ numeric โ€บ math โ€บ round
round, roundf, roundl, lround, lroundf, lroundl, llround, llroundf, llroundl - cppreference.com
May 23, 2024 - The largest representable floating-point values are exact integers in all standard floating-point formats, so round never overflows on its own; however the result may overflow any integer type (including intmax_t), when stored in an integer variable. POSIX specifies that all cases where lround or llround raise FE_INVALID are domain errors.
๐ŸŒ
LabEx
labex.io โ€บ tutorials โ€บ c-perform-rounding-operations-in-c-435192
How to Perform Rounding Operations in C | LabEx
June 10, 2019 - In this lab, you will learn how to perform rounding operations in C programming. You will start by declaring floating-point variables, then explore the use of various rounding functions, such as round(), floor(), and ceil(), to manipulate the values.