Telegramy
Articles
About
« Rev
@programminginc
656
Fwd »
MᏫᎻᎯᎷᎷᎬᎠ
z is not defined
MᏫᎻᎯᎷᎷᎬᎠ
int main() { int x,y=2,z,a; if ( x = y%2) z =2; a=2; printf("%d %d ",z,x); return 0; }
.
MᏫᎻᎯᎷᎷᎬᎠ
And x is 0
BinaryByter
Mmm, right. What an ugly thing however
That's the least ugly thing in the code. Even the main function is ugly
Sanket
So what will be the value of z,x??
Sanket
.
Sanket Jain: So what will be the value of z,x??
BinaryByter
Everything that can play a 720p video
480p is enough
BinaryByter
So what will be the value of z,x??
Compile it, fix the errors and come back
BinaryByter
But don't use ugly syntax please
MᏫᎻᎯᎷᎷᎬᎠ
Sanket Jain: So what will be the value of z,x??
Undefined behavior
MᏫᎻᎯᎷᎷᎬᎠ
It could be -xxxxxx
Sanket
Undefined behavior
I have compiled it and it gives me 0,0
MᏫᎻᎯᎷᎷᎬᎠ
Like -61852
MᏫᎻᎯᎷᎷᎬᎠ
I have compiled it and it gives me 0,0
Your OS is good
MᏫᎻᎯᎷᎷᎬᎠ
And plz
MᏫᎻᎯᎷᎷᎬᎠ
Before using a variable
MᏫᎻᎯᎷᎷᎬᎠ
Make sure you have intialized it
MᏫᎻᎯᎷᎷᎬᎠ
That's why auto is nearly perfect
MᏫᎻᎯᎷᎷᎬᎠ
XD
Dexter
Dexter
Dexter
In this i used single quotation to assign a new value to the first character of array And i got desired result ie dexter replaced by pexter
BinaryByter
Undefined behavior
No
BinaryByter
Won't compile
BinaryByter
Unless you write your own compiler
BinaryByter
Then you can make it compile that
Dexter
However i used double quotation and i got very awkward result ie instead of pexter i got 4exter
Dexter
Why?
MᏫᎻᎯᎷᎷᎬᎠ
Won't compile
Wht
Mat
However i used double quotation and i got very awkward result ie instead of pexter i got 4exter
Double quotes are Strings
MᏫᎻᎯᎷᎷᎬᎠ
I have compiled it and it gives me 0,0
Look @linuxer4fun
Mat
So it's kinda undefined
Dexter
So is this a cast error?
Qwasi_
Guys I need your help I want to use international number what should I do
Mat
Guys I need your help I want to use international number what should I do
1 2 3 4 5?
BinaryByter
Look @linuxer4fun
What the fuck? Why does it compile? Z in not declared
Anonymous
Any php coders here?
MᏫᎻᎯᎷᎷᎬᎠ
What the fuck? Why does it compile? Z in not declared
That's on java
MᏫᎻᎯᎷᎷᎬᎠ
That's on java
The compiler complains "You may not initialized z"
Mat
So what will be the value of z,x??
Can you write a good qustion next time?
Dima
back then people coded in < 144p
Dima
80x25 kek
Mat
So what will be the value of z,x??
#howtoask
BinaryByter
80x25 kek
Xd
BinaryByter
The compiler complains "You may not initialized z"
DECLARED not INITIALIZED
MᏫᎻᎯᎷᎷᎬᎠ
DECLARED not INITIALIZED
Yes it was
MᏫᎻᎯᎷᎷᎬᎠ
int x, y=2, z, a;
Anonymous
u need a coffe, maybe
BinaryByter
We very probably lack some global scope informations
BinaryByter
Because as is, the code won't compile
BinaryByter
And if it doen, i'lr complain at stroustrupp
BinaryByter
int x, y=2, z, a;
Where is z declared?
BinaryByter
You declare x and y
MᏫᎻᎯᎷᎷᎬᎠ
Look closely
BinaryByter
int x, y;
BinaryByter
Ahhhh
BinaryByter
Wait
BinaryByter
I'm stupid
BinaryByter
Sorry
BinaryByter
My inner parser splitted the statement at the wrong position
MᏫᎻᎯᎷᎷᎬᎠ
My inner parser splitted the statement at the wrong position
No
MᏫᎻᎯᎷᎷᎬᎠ
It just that you are familiarized with clean coding
BinaryByter
No
I thought that int x, y = 2, z, a; Expands to int x = 2; int y = z;
MᏫᎻᎯᎷᎷᎬᎠ
I thought that int x, y = 2, z, a; Expands to int x = 2; int y = z;
Now you know it
MᏫᎻᎯᎷᎷᎬᎠ
Lol
MᏫᎻᎯᎷᎷᎬᎠ
Student teaches his Master
BinaryByter
Though i hope that i will never have to see this abomination again
@LEGIT9BUYER
Hi friends any one know about kotlin languages
@LEGIT9BUYER
Am new person in this group
@LEGIT9BUYER
I want learn about kotlin technology any one suggest to me please
MᏫᎻᎯᎷᎷᎬᎠ
Though i hope that i will never have to see this abomination again
Sure
MᏫᎻᎯᎷᎷᎬᎠ
I want learn about kotlin technology any one suggest to me please
https://en.wikipedia.org/wiki/Kotlin_(programming_language)
BinaryByter
I want learn about kotlin technology any one suggest to me please
This is a c++ only group.
BinaryByter
Which promotes learning to google
MᏫᎻᎯᎷᎷᎬᎠ
This is a c++ only group.
Ops
MᏫᎻᎯᎷᎷᎬᎠ
Srry
@LEGIT9BUYER
This is a c++ only group.
Just I need suggestions only
BinaryByter
Just I need suggestions only
Google :)
BinaryByter
The first link is what i'd send you if i googled for you
@LEGIT9BUYER
Google :)
🙏🙏
« Rev
@programminginc
656
Fwd »