was bedeutet % und was beudetet das "f" in meinem C Programm?

2 Antworten

You need to understand the format specifier in C language. The format specifiers helps the compiler to understand the data types and formats in the input or output stream. It is used with scanf() function while taking input and printf() function while printing the output.

The complete list of format specifier can be found here:

https://www.alphacodingskills.com/c/c-format-specifiers.php

Das, was zwischen den Gänsefüßchen steht, sind Formatierungsanweisungen, nicht zu verwechseln mit Operatoren oder anderen Dingen. %f heisst, gib mir x als Float-Zahl aus.

http://userpage.fu-berlin.de/~ram/pub/pub_jf47ht81Ht/c_zahlenformatierung_de

https://www.quora.com/What-does-f-mean-in-the-C-programming-language

'float' in deinem Beispiel ist ein Deklarator. Damit wird die nachfolgend genannte Variable als vom Datentyp Float deklariert. Sie ist also keine Double, kein Integer, kein Array oder String.

https://www.techonthenet.com/c_language/variables/create_float.php

frost1989 
Fragesteller
 07.12.2016, 13:17

Danke dir. Gibt es irgenwo eine Liste. wo ich sehen kann welche verschiedene Operatoren es gibt...es gibt ja auch zum Beispiel %d

Das heißt glaube ich gebe x als Ganzzahl aus...

0