Ans will be 65. Explanation: lets break the problem into part (1) At first the condition is sizeof(var) if this condition is evaluated to be true then (var2>23 ? ((var==75) ? 'A' : 0) : 0) will be returned if false then 0 will be returned As we know sizeof() is an unary operator which returns how many byte a datatype can hold as var is an variable of integer data type , sizeof(var) will either return 2 or 4 as machine to machine int vary . We know every number except 0 is evaluated to be true. So (var2>23 ? ((var==75) ? 'A' : 0) : 0) it will returned (2)next the condition is (var2>23) if this condition is evaluated to be true then ((var==75) ? 'A' : 0) will be returned if false then 0 will be returned as we know 56>23 is true then ((var==75) ? 'A' : 0) will be returned. (3)the condition is (var==75) if this condition is evaluated to be true then 'A' will be returned if false then 0 will be returned As 75==75 then 'A' will be returned and stored into num variable As c support auto type casting so int can store char. In the final printf function we use the placeholder %d and it print integer value . According to Ascii integer value of 'A' is 65 So the output will be 65.
Why don't you think that ((var==75)? 'A' : 0) will be evaluated first? [As we know that bracket has the highest precedence than any other operator in C.]
@@ayushvats1808 Yeah, Brother. I also think so. Moreover, the associativity of conditional operator(? :) works from right to left. That's why I think ((var == 75)? 'A' : 0) will be evaluated first.
Answer -> 65 Solution -> num = sizeof(var) ? (var2 > 23 ? ((var == 75) ? 'A' : 0) : 0) : 0; as we know, var==75 is True, therefore, (var == 75) ? 'A' : 0 will be equal to 'A'. Then we will replace the equation with 'A' in the main equation. num = sizeof(var) ? (var2 > 23 ? 'A' : 0) : 0; as we know, var2 == 56, hence greater than 23, therefore, var2 > 23 ? 'A' : 0 will be equal to 'A'. Then we will replace the equation with 'A' in the main equation. num = sizeof(var) ? 'A' : 0; as we know, as condition is True if the result of expression is any number except 0, sizeof(var) == 4, as its an integer data type. sizeof(var) is a True statement, therefore, sizeof(var) ? 'A' : 0 will be equal to 'A'. This implies num = 'A'; In the printf statement, the format specifier of num is %d, so the ASCII value of the character will be printed. ASCII value of 'A' = 65.
O/p is 65 ... because all three condition are true...sizeof(var) Shows the size of int (which is other than 0 ....and then after all condition are executed it will return A and the decimal of A is 65 .. according to ASCII TABLE
@@saiyadav5014 Answer should A for sure as all the conditions are true, but compiler should execute A as a integer value as it is assigned to num variable that is integer variable.
The answer is 65 First we will solve the inner brackets. According to that our condition is true so it will store the corresponding value of A according to ASCII i.e. 65 (because we are dealing with integer datatype). Then we will work our way out solving the outer brackets one by one. Hence the final answer is 65.
okay guys , here is the point .. if we considered it as an if statement , it'll be as following ; ) int var = 75 , var2 = 65; int num ; if(sizeof(var)) { if(var2 > 23) { if(var == 75) { num = 'A'; } } printf("%d" , num); } else return 0; the output is gonna be 65 , and this is according to ASCII table , as 'A' is = 65 ..
Sir please solve homework problems also so that we can give it a try and if we are not able to solve it then we can refer to your explanation that would really really be helpful for beginners like me and all would really appreciate that effort of yours!!!! 🙏🙏🙏🙏
Result is 65, start to solve from the inner bracket to the outer bracket, fixed inputs and take care of format specifier used during output, it will convert the result A into ASCII decimal 65 (%d is used for output)
#solution #include int main() { int var=75,var2=56,num; num=sizeof(var)?(var>23? ((var==75)?'A':0):0):0; printf(" the num is :%d",num); return 0; } output=65
All other inner conditional expressions will be treated first. They return true. Then, the main operand, sizeof, returns true which implies 'A' will be returned. Since %d specifier was used, the printf will print the decimal value of character A, which is 65.
First rule to be followed while solving these type of conditions is: First of all we need to divide given expression into three parts i.e L|M|R And then start evaluate each and expression. Al last num variable initialised by A which is equivalent of 65.
Out put will be 65 Since program execution begins from main function Declared variable var and assigned 75 to it Declared another variable var2 and assigned 56 to it Declared num integer type And given condition sizeof is unary operator since given sizeof(int) it returns 2 or 4 bytes depends on the compiler machine.How many bytes int will occupy it returns We know that if the condition is false it returns 0 and other than 0 returns 1 so now our condition is true it checks other condition of that true it checks other condition finally it returns A and num is assigned with A and it will be printed since the value of A according to ASCII in c is 65
The output of the programa is A, because as sizeof(var) is diferent to 0 it enters to the first true statement, then it checks if var2 > 23, that is true, so finally checks it var == 75, again this is true so num equal to A
so as i think that we have break it inside the bracket (var==75)?'A':0 then the answer is A because 75 is equal to 75. then, (var2>23?'A':0) then the answer will be A because 56 is greater than 23. then, we have sizeof(var)?'A':0; then the ascii A will be implemented that is 65
Easy explanation of last exercise: Remember that Expression1 ? Expression 2 : Expression 3 means: if Expression1 is True return Expression 2, else return Expression 3 so rephrasing the exercise we get: if (sizeof(var) is True return (if (var2 > 23) is True return ( if var == 75 return 'A' else return 0) else return 0) else return 0. Now just remember var is int and sizeof(int) returns 4 (which C reads as True) and ascii code of 'A' is 65 (i read it from other answers)
*/Output will be*/ 65 as per the expression, the result will be 'A' and it will be stored in num. But, num is int type data So, 'A' will be converted to its corresponding ASCII value which is 65.
The ans is 65 i.e. Numerical equivalent of the letter A. Explaination: The first condition/expression will return the size of var which is ofcourse more than 0, and as we all know, any value other than 0 is said to be true, so hence, the next expression will get terminated, which is again true... Bec var2 i.e. 56 > 23, thus the next expression will get terminated which i again true as we can see the value of var is 75, So thus, being true it will again terminate the true statement, But this time, there is no condition and its just a letter 'A', So as it being the last one of the conditions, the 'A' will get stored in num And as we know, ("%d") prints numerical values, so even if we store alphabetical values, it will convert the alphabetical value to its Numerical equivalent according to the ASCII Table and thus we will be getting the output as 'A' i.e. 65.
can you determine the size of on your own without using the sizeof() operator? is it like a rule where int is always 4? And do we start solving the expression from the parenthese on the inside or outside first?
Sir I’m studying only 10th standard but learning c from u thanks a lot sir and I got the answer for ur homework problem as 0 if wrong plz explain by replying to me
Ans will be 65. Explanation: lets break the problem into part (1) At first the condition is sizeof(var) if this condition is evaluated to be true then (var2>23 ? ((var==75) ? 'A' : 0) : 0) will be returned if false then 0 will be returned As we know sizeof() is an unary operator which returns how many byte a datatype can hold as var is an variable of integer data type , sizeof(var) will either return 2 or 4 as machine to machine int vary . We know every number except 0 is evaluated to be true. So (var2>23 ? ((var==75) ? 'A' : 0) : 0) it will returned (2)next the condition is (var2>23) if this condition is evaluated to be true then ((var==75) ? 'A' : 0) will be returned if false then 0 will be returned as we know 56>23 is true then ((var==75) ? 'A' : 0) will be returned. (3)the condition is (var==75) if this condition is evaluated to be true then 'A' will be returned if false then 0 will be returned As 75==75 then 'A' will be returned and stored into num variable As c support auto type casting so int can store char. In the final printf function we use the placeholder %d and it print integer value . According to Ascii integer value of 'A' is 65 So the output will be 65.Ans will be 65.
int var = 75; declares and initializes an integer variable var with the value 75. int var2 = 56; declares and initializes another integer variable var2 with the value 56. int num; declares an integer variable num without initializing it. Now, let's analyze the following line: num = sizeof(var) ? (var2 > 23 ? ((var == 75) ? 'A' : 0) : 0) : 0; This line uses nested conditional operators to assign a value to num based on several conditions: sizeof(var) calculates the size of the var variable, which is 4 bytes (assuming a typical 32-bit system). var2 > 23 checks if var2 is greater than 23, which is true because var2 is 56. (var == 75) ? 'A' : 0 checks if var is equal to 75. If it is, it assigns the character 'A' to num; otherwise, it assigns 0. So, the value of num will be 'A' because both sizeof(var) and var2 > 23 are true, and var is indeed equal to 75. Finally, the code prints the value of num using printf, which will output 'A' as a character (ASCII value of 'A' is 65). Therefore, the output of this code will be: A
Ans is A because all 3 statement is true and if true the ans is A. But in printf it's %d which is integer and value of A is 65 in decimal so Final ans = 65
answer --> 51 explanation a=7; a^=5--> a=a^5--> a=2 printf("%d",a+=3)--> a+=3-->a=a+3--->a=5; printf("%d",printf(printf("%d",a+=3));------->51 ans only one character is there so 1 will be printed after 5..
//We can think just like that if (sizeof(var)) { // 4 = true so go inside if(var2>23) { // 56>23=true so go inside if (var==75) { //var=var= true so go inside num='A'; // Final 'A' will assign in num else num=0; } else num=0; } else num=0; }
Output is 'A', how A become 65 ,pls anyone explain me.....???ohhh i gotted because be are storing value of char data type in int data type as a answer.....if we are using char num .....than answer is A .....👍👍🙏 Char Value of A to Z in int value A=65 B=66 C=67 D=68 So on...
1st: sizeof (var)? (var2>23 ? ((var==75)? 'A' : 0) : 0) : 0 ; is evaluated and here sizeof(var) is either 2 or 4 (depends on machine to machine), not zero. and go for next expression: (var2>23 ? ((var==75)? 'A' : 0) : 0) 2nd: (var2>23 ? ((var==75)? 'A' : 0) : 0) is evaluated and here var2>23 this also true and to for next expression: (var==75)? 'A' : 0) 3rd: (var==75) ? 'A' : 0 is evaluated and here var==75 is true, so 'A' go forward.Then 'A' is assigned with num and then print 'A' in integer form: 65 (ASCII)
Ans will be 65.
Explanation:
lets break the problem into part
(1) At first the condition is sizeof(var)
if this condition is evaluated to be true then (var2>23 ? ((var==75) ? 'A' : 0) : 0) will be returned
if false then 0 will be returned
As we know sizeof() is an unary operator which returns how many byte a datatype can hold
as var is an variable of integer data type , sizeof(var) will either return 2 or 4 as machine to machine int vary . We know every number except 0 is evaluated to be true. So (var2>23 ? ((var==75) ? 'A' : 0) : 0) it will returned
(2)next the condition is (var2>23)
if this condition is evaluated to be true then ((var==75) ? 'A' : 0) will be returned
if false then 0 will be returned
as we know 56>23 is true then ((var==75) ? 'A' : 0) will be returned.
(3)the condition is (var==75)
if this condition is evaluated to be true then 'A' will be returned
if false then 0 will be returned
As 75==75 then 'A' will be returned and stored into num variable
As c support auto type casting so int can store char.
In the final printf function we use the placeholder %d and it print integer value .
According to Ascii integer value of 'A' is 65
So the output will be 65.
Thank you
Thanks a lot :)
Why don't you think that ((var==75)? 'A' : 0) will be evaluated first? [As we know that bracket has the highest precedence than any other operator in C.]
@@mehadihasansanto538 xactly this is my doubt and i think bracket will only be evaluated first
@@ayushvats1808 Yeah, Brother. I also think so. Moreover, the associativity of conditional operator(? :) works from right to left. That's why I think ((var == 75)? 'A' : 0) will be evaluated first.
Answer -> 65
Solution ->
num = sizeof(var) ? (var2 > 23 ? ((var == 75) ? 'A' : 0) : 0) : 0;
as we know, var==75 is True, therefore, (var == 75) ? 'A' : 0 will be equal to 'A'.
Then we will replace the equation with 'A' in the main equation.
num = sizeof(var) ? (var2 > 23 ? 'A' : 0) : 0;
as we know, var2 == 56, hence greater than 23, therefore, var2 > 23 ? 'A' : 0 will be equal to 'A'.
Then we will replace the equation with 'A' in the main equation.
num = sizeof(var) ? 'A' : 0;
as we know, as condition is True if the result of expression is any number except 0, sizeof(var) == 4, as its an integer data type.
sizeof(var) is a True statement, therefore, sizeof(var) ? 'A' : 0 will be equal to 'A'.
This implies num = 'A';
In the printf statement, the format specifier of num is %d, so the ASCII value of the character will be printed. ASCII value of 'A' = 65.
You make it understandable. You remove my confusion to explain it line by line. Thax
O/p is 65 ... because all three condition are true...sizeof(var)
Shows the size of int (which is other than 0 ....and then after all condition are executed it will return A and the decimal of A is 65 ..
according to ASCII TABLE
But here parenthesis is given first evaluate parenthesis then applied conditional ..
By evaluating with the parentheses the answer will be A.
But in what manner computer will execute.?
@@saiyadav5014 Answer should A for sure as all the conditions are true, but compiler should execute A as a integer value as it is assigned to num variable that is integer variable.
tq bro
@@Gautamsingh-dy4cp but as for associvity rule it caan be done from left to right
Interesting lectures and also they are making to think for every homework questions.
The answer is 65
First we will solve the inner brackets. According to that our condition is true so it will store the corresponding value of A according to ASCII i.e. 65 (because we are dealing with integer datatype). Then we will work our way out solving the outer brackets one by one. Hence the final answer is 65.
it will be wayyy better if you can explain the homework problems @nesoacademy sometimes I can't fully comprehend the answers
yes
Yes
Yeah, that would be really nice :(
65
@@AK--vc9wd I to get the same answer
Output will be the ASCI code of 'A' =65; Thank you for your efforts, I like your explanation so much ❤
thanks bro
65 since sizeof var is 4or 8 according to processor which is True in boolean form and ascii value of A is 65 as we need to print in integer the value.
okay guys , here is the point ..
if we considered it as an if statement , it'll be as following ; )
int var = 75 , var2 = 65;
int num ;
if(sizeof(var))
{
if(var2 > 23)
{
if(var == 75)
{
num = 'A';
}
}
printf("%d" , num);
}
else
return 0;
the output is gonna be 65 , and this is according to ASCII table , as 'A' is = 65 ..
thank you very much for explanation Mr Sedeek. If you do not mind
i will ask you questions in future too
by looking at this equation now i understood the last stage of the problem clearly
Please make your own videos,no gyan choding here
else statements biro ?
Var 2 is 56 .how u right 65?
Sir please solve homework problems also so that we can give it a try and if we are not able to solve it then we can refer to your explanation that would really really be helpful for beginners like me and all would really appreciate that effort of yours!!!! 🙏🙏🙏🙏
This question is like 10 questions in one question. Neso team is great.
Result is 65, start to solve from the inner bracket to the outer bracket, fixed inputs and take care of format specifier used during output, it will convert the result A into ASCII decimal 65 (%d is used for output)
#solution
#include
int main()
{
int var=75,var2=56,num;
num=sizeof(var)?(var>23? ((var==75)?'A':0):0):0;
printf(" the num is :%d",num);
return 0;
}
output=65
hands down this is the best channel . pls continue blessing us with valuable information.
All other inner conditional expressions will be treated first. They return true. Then, the main operand, sizeof, returns true which implies 'A' will be returned.
Since %d specifier was used, the printf will print the decimal value of character A, which is 65.
First rule to be followed while solving these type of conditions is:
First of all we need to divide given expression into three parts i.e L|M|R
And then start evaluate each and expression.
Al last num variable initialised by A which is equivalent of 65.
Thanks for teaching me something in 5 minutes that my teacher took two 50 minutes classes for! 😃😃
I think that's the main reason, why does our education system lag behind.
true uncle@@kunalkhallar9699
Out put will be 65
Since program execution begins from main function
Declared variable var and assigned 75 to it
Declared another variable var2 and assigned 56 to it
Declared num integer type
And given condition sizeof is unary operator since given sizeof(int) it returns 2 or 4 bytes depends on the compiler machine.How many bytes int will occupy it returns
We know that if the condition is false it returns 0 and other than 0 returns 1 so now our condition is true it checks other condition of that true it checks other condition finally it returns A and num is assigned with A and it will be printed since the value of A according to ASCII in c is 65
5:22 o/p is 65
thanks a bunch to the tutor n nesoAcademy ❤🙏
O/p - ASCII Value of A= 65
Explained it perfectly man!!!!
Ans of H.W:It will print 65 that means the o/p of code is 'A'
65 is a ASCII value of capital 'A'.
The output of the programa is A, because as sizeof(var) is diferent to 0 it enters to the first true statement, then it checks if var2 > 23, that is true, so finally checks it var == 75, again this is true so num equal to A
Lakshman Patel, thanks
@@lakshmanpatelofficial but why is 65 ?
@@ankurdutta5641 A = 65 according to ASCll
Output will be ASCII value of 'A' ie. 65
so as i think that we have break it inside the bracket
(var==75)?'A':0 then the answer is A because 75 is equal to 75.
then,
(var2>23?'A':0) then the answer will be A because 56 is greater than 23.
then,
we have sizeof(var)?'A':0; then the ascii A will be implemented that is 65
Output will be : 65
Thanks a lot for videos sir ❣️. It's really helpful.
Easy explanation of last exercise:
Remember that Expression1 ? Expression 2 : Expression 3 means:
if Expression1 is True return Expression 2, else return Expression 3
so rephrasing the exercise we get:
if (sizeof(var) is True return (if (var2 > 23) is True return ( if var == 75 return 'A' else return 0) else return 0) else return 0.
Now just remember var is int and sizeof(int) returns 4 (which C reads as True) and ascii code of 'A' is 65 (i read it from other answers)
*/Output will be*/
65
as per the expression, the result will be 'A' and it will be stored in num. But, num is int type data So, 'A' will be converted to its corresponding ASCII value which is 65.
Really awesome classes.
Pls tell the ans with ur explain @neso academy.. All doute are clear
The ans is 65 i.e. Numerical equivalent of the letter A.
Explaination:
The first condition/expression will return the size of var which is ofcourse more than 0, and as we all know, any value other than 0 is said to be true, so hence, the next expression will get terminated, which is again true...
Bec var2 i.e. 56 > 23, thus the next expression will get terminated which i again true as we can see the value of var is 75,
So thus,
being true it will again terminate the true statement,
But this time, there is no condition and its just a letter 'A',
So as it being the last one of the conditions, the 'A' will get stored in num
And as we know,
("%d") prints numerical values, so even if we store alphabetical values, it will convert the alphabetical value to its Numerical equivalent according to the ASCII Table and thus we will be getting the output as 'A' i.e. 65.
can you determine the size of on your own without using the sizeof() operator? is it like a rule where int is always 4? And do we start solving the expression from the parenthese on the inside or outside first?
Which ternary operator gets evaluated first?
Answer is 65 , thank you so much for this lectures
Will print 65 because 65 is the ASCII value of A if you use print("%c", num); instead of %d you will get A.
It will print output as a 65
which is ASCII equivalent of 'A'
Ans will be 65
because the return value of 'num' is equal to 'A'
according to ASCII table the value of A is 65.
Sir I’m studying only 10th standard but learning c from u thanks a lot sir and I got the answer for ur homework problem as 0 if wrong plz explain by replying to me
ans is 65
Ans will be 65.
Explanation:
lets break the problem into part
(1) At first the condition is sizeof(var)
if this condition is evaluated to be true then (var2>23 ? ((var==75) ? 'A' : 0) : 0) will be returned
if false then 0 will be returned
As we know sizeof() is an unary operator which returns how many byte a datatype can hold
as var is an variable of integer data type , sizeof(var) will either return 2 or 4 as machine to machine int vary . We know every number except 0 is evaluated to be true. So (var2>23 ? ((var==75) ? 'A' : 0) : 0) it will returned
(2)next the condition is (var2>23)
if this condition is evaluated to be true then ((var==75) ? 'A' : 0) will be returned
if false then 0 will be returned
as we know 56>23 is true then ((var==75) ? 'A' : 0) will be returned.
(3)the condition is (var==75)
if this condition is evaluated to be true then 'A' will be returned
if false then 0 will be returned
As 75==75 then 'A' will be returned and stored into num variable
As c support auto type casting so int can store char.
In the final printf function we use the placeholder %d and it print integer value .
According to Ascii integer value of 'A' is 65
So the output will be 65.Ans will be 65.
int var = 75; declares and initializes an integer variable var with the value 75.
int var2 = 56; declares and initializes another integer variable var2 with the value 56.
int num; declares an integer variable num without initializing it.
Now, let's analyze the following line:
num = sizeof(var) ? (var2 > 23 ? ((var == 75) ? 'A' : 0) : 0) : 0;
This line uses nested conditional operators to assign a value to num based on several conditions:
sizeof(var) calculates the size of the var variable, which is 4 bytes (assuming a typical 32-bit system).
var2 > 23 checks if var2 is greater than 23, which is true because var2 is 56.
(var == 75) ? 'A' : 0 checks if var is equal to 75. If it is, it assigns the character 'A' to num; otherwise, it assigns 0.
So, the value of num will be 'A' because both sizeof(var) and var2 > 23 are true, and var is indeed equal to 75.
Finally, the code prints the value of num using printf, which will output 'A' as a character (ASCII value of 'A' is 65).
Therefore, the output of this code will be:
A
Steps occured:
1. num = sizeof(var) ? (var > 23 ? ((var == 75) ? 'A' : 0) : 0) : 0;
2. num = sizeof(var) ? (var > 23 ? ('A') : 0) : 0;
3. num = sizeof(var) ? (('A')) : 0;
4. num = (('A'));
Thus, num = 65 (when expressed in integer format)
Ans is A because all 3 statement is true and if true the ans is A.
But in printf it's %d which is integer and value of A is 65 in decimal so
Final ans = 65
all the three boolean returns true value so the value of num is "A" then the ASCII value of A is printed.
so the final answer will be 65...........
65 ans because 'A' will be stored in num and due to %d it will be printed in ascii encoding equivalent 65.
The answer 65
From inside out
((Var==75)?’A’:0 True. ‘A’. Then
Var2>23?’A’:0. True. ‘A’ then
Sizeof(var) ?’A’:0. True. ‘A’
Nume=‘A’
Nume=65
65
Tip: use different bracket such as {}()
Output is 65, the decimal value of A
Thank you sir very nice gide & very nice best information conditional operator teaching video.👍
answer --> 51
explanation
a=7;
a^=5--> a=a^5--> a=2
printf("%d",a+=3)--> a+=3-->a=a+3--->a=5;
printf("%d",printf(printf("%d",a+=3));------->51 ans
only one character is there so 1 will be printed after 5..
using return in ternary operator is allowed?
//We can think just like that
if (sizeof(var)) { // 4 = true so go inside
if(var2>23) { // 56>23=true so go inside
if (var==75) { //var=var= true so go inside
num='A'; // Final 'A' will assign in num
else
num=0;
}
else
num=0;
}
else
num=0;
}
Nice steps bro👏
Output is 'A', how A become 65 ,pls anyone explain me.....???ohhh i gotted because be are storing value of char data type in int data type as a answer.....if we are using char num .....than answer is A .....👍👍🙏
Char Value of A to Z in int value
A=65
B=66
C=67
D=68
So on...
int var = 75;
int var2 = 56;
int num;
num = sizeof(var) ? (var2 > 23 ? ((var == 75) ? 'A' : 0) : 0) : 0;
num = sizeof(var) ? 'A' : 0;
num = sizeof(var) ? 'A' : 0;
num = 65
As the variable num is of data type integer how can it take of char 'A' as its value and print 65 in integer
Output is 65...ascii of A
65. // Ascii value of 'A'
do we have to memorise the ascii table values?
Var==75 true A
Var2>23 true A
Sizeof(var) 4 non zero true A
A is character we are using %d A ASCII value 65
But how could the size of var be A?
Whole expression is true that's by it has to return 65(at the place of A because c supports auto casting).
65 or wot blissed lectures.....
Ans A
ASCII value of A is 65
Ans is A but the return value is in the form of int datatype then it will transform into ASCII format return the value of A is 65
So the output is 65
the answer will be 65, the ASCII value of 'A'. As each of the three statements is true so expression 2 of each statement will be the outcome.
Thanks
I wonder if we can solve not from inner bracket but from the outer bracket, in this HW, both conditions are the same.
'A' is implicitly convert to int to become 65
questions are just amazing..
Please explain again condition operation
size of var is something other than 0 therefore, the condition is going to be true and A will be printed.
There is %d which is decimal placeholder therefore it's ASCII value will be printed which is 65
Sir firstly applied parenthesis operation after that apply ternary operator..first offl all remove parenthesis then evaluate ..it true or not
Excellent👍
Numeric value of a return 65
Good morning 🙏 🌄
Your classes are amazing sir , the way you explain with examples makes us more easier to understand the topics .
65 stand for character A
All the conditions are true.
65 ASCII code of "A"
Output: 65
the num = A ,but the output should be decimal number, then it convert to its binary representation 65
thnak you
ASCII code of 'A' will be the answer and that is 65
Thank you so much for this information
65 because all conditions are true hence variable contain A and in decimal it will be 65
Great job kn explaining this! Thank you 😊 soo much
Thnx . U have given me a best lecture
answer = 65 .... this is the decimal number parallel to "A" in ascii table.
1st: sizeof (var)? (var2>23 ? ((var==75)? 'A' : 0) : 0) : 0 ; is evaluated and here sizeof(var) is either 2 or 4 (depends on machine to machine), not zero. and go for next expression: (var2>23 ? ((var==75)? 'A' : 0) : 0)
2nd: (var2>23 ? ((var==75)? 'A' : 0) : 0) is evaluated and here var2>23 this also true and to for next expression: (var==75)? 'A' : 0)
3rd: (var==75) ? 'A' : 0 is evaluated and here var==75 is true, so 'A' go forward.Then 'A' is assigned with num and then print 'A' in integer form: 65 (ASCII)
Both conditions are satisfied and print A value or A
Please upload console i/o functions
thank you so much sir
Ofcourse
answer is A, since all conditions happen to be true in all tested case.
Sir please give the solution video also so that we can compare our result
O/p will be 2 bcz sizeof doesn't evaluate expression
ascii value of A=65
65 the ASCII value of A
How it will contain 1 in conditional operators
65. Thank you, Sir
Thank u
Super sir
Output of assignment is 65
I solved in first attempt , before this playlist ,i used to write stdio.h to studio.h