diff options
author | Oskar <[email protected]> | 2024-08-22 20:56:13 +0200 |
---|---|---|
committer | Oskar <[email protected]> | 2024-08-22 20:56:13 +0200 |
commit | 1208defdbc457a89c0d9aea3b8faf86b8492761f (patch) | |
tree | df04141a05d788074030111b01735e65c7655c0b | |
parent | 5e6954e218455d912686f9adda25ddcd09ca267c (diff) |
more
-rw-r--r-- | 4p34.cpp | 32 | ||||
-rw-r--r-- | 4p35.cpp | 22 |
2 files changed, 54 insertions, 0 deletions
diff --git a/4p34.cpp b/4p34.cpp new file mode 100644 index 0000000..81bbf4c --- /dev/null +++ b/4p34.cpp @@ -0,0 +1,32 @@ +#include <iostream> + +/* + * + * 4.34 + * + * + */ + +bool flag; +short sval; +int ival; +long lval; +float fval; +char cval; +unsigned short usval; +unsigned int uival; +unsigned long ulval; +double dval; +int main () { + + if (fval) { + // Converted to bool + } + + dval = fval + ival; // ival converted to float, then both converted to double + if(dval + ival * cval) { // cval converted to intm ival and cval converted to double + + } + + return 0; +} diff --git a/4p35.cpp b/4p35.cpp new file mode 100644 index 0000000..d5483fd --- /dev/null +++ b/4p35.cpp @@ -0,0 +1,22 @@ +#include <iostream> + +/* + * + * 4.35 + * + * + */ + +char cval; +float fval; +int ival; +unsigned int ui; +double dval; +int main () { + + cval = 'a' + 3; + fval = ui - ival * 1.0; + dval = ui * fval; + cval = ival + fval + dval; + return 0; +} |