Increment And Decrement Operators - Kannada
- subtitles off
- captions off
- English
- Kannada
- Questions posted on Forums
- C and Cpp Tutorials - Kannada
-
Assignments
How to solve the expression (a/b)+(c/d) using typecasting in c
11-12M 20-30S Ammu15
Answer last updated on: Aug. 21, 2024, 9:48 p.m.
-
Assignments
#include <iostream>using namespace std;int main() { int a, b, c, d; cout<<"Enter a and b: "; cin>>a>>b; cout<<"Enter c and d: "; cin>>c>>d; float ans = (a/b)+(c/d); cout<<"Answer(without typecast) = "<<ans<<"\n"; ans = ((float)a/b)+((float)c/d); cout<<"Answer(with typecast) = "<<ans<<"\n"; return 0;}Why the output is in 'int' type but not 'float' type?But the same program in C came with output of 'float' type.
11-12M 20-30S Sujan_A_T
Answer last updated on: Aug. 19, 2024, 3:05 p.m.
-
type casting
In assignment question, i can understand typecasting of given expression but what is the meaning of real division in type casting?
11-12M 50-60S prabhu84a
Answer last updated on: Feb. 29, 2020, 4:18 p.m.
-
1First C Program
-
2First Cpp Program
-
3Tokens
-
4Functions
-
5Scope Of Variables
-
6If And Else If statement
-
7Nested If And Switch Statement
-
Increment And Decrement Operators
-
9Arithmetic Operators
-
10Relational Operators
-
11Logical Operators
-
12Loops
-
13Arrays
-
14Working With 2D Arrays
-
15Strings
-
16String Library Functions
-
17Working With Structures
-
18Understanding Pointers
-
19Function Call
-
20File Handling In C
Questions posted on ST Forums:
998 visits
Outline:
ಸಾರಾಂಶ : ಇಂಕ್ರಿಮೆಂಟ್ ಮತ್ತು ಡಿಕ್ರಿಮೆಂಟ್ ಆಪರೇಟರ್ಗಳು -ಇಂಕ್ರಿಮೆಂಟ್ಆಪರೇಟರ್ -ಉದಾಹರಣೆಗೆ ++ -ಪೊಸ್ಟ್ ಫಿಕ್ಸ್ಇಂಕ್ರಿಮೆಂಟ್ -ಉದಾಹರಣೆಗೆ a++ -ಪ್ರಿ ಫಿಕ್ಸ್ಇಂಕ್ರಿಮೆಂಟ್ -ಉದಾಹರಣೆಗೆ ++a -ಡಿಕ್ರಿಮೆಂಟ್ಆಪರೇಟರ್ -ಉದಾಹರಣೆಗೆ -- - ಪೋಸ್ಟ್ ಫಿಕ್ಸ್ ಡಿಕ್ರಿಮೆಂಟ್ -ಉದಾಹರಣೆಗೆ a-- -ಪ್ರಿ ಫಿಕ್ಸ್ಡಿಕ್ರಿಮೆಂಟ್ -ಉದಾಹರಣೆಗೆ --a -ಟೈಪ್ ಕಾಸ್ಟಿಂಗ್ -ಎರರ್ ಗಳು
Width: | 800 | Height: | 672 |
---|---|---|---|
Duration: | 00:11:01 | Size: | 5.4 MB |
Show video info