Christian
Ok thank you, I’ll have a sleep on it
Christian
That’s so strange, tomorrow I’ll send you the output
Christian
It worked on my machine
Do it counts the char you pass it
Christian
Could it depends on my compiler maybe?
Christian
I’m lost
\Device\NUL
Could it depends on my compiler maybe?
Try to give curly bracket at the loop
\Device\NUL
Course I did it
Weird, you have recompile it right ?
Christian
Yes
Christian
Compile and run
\Device\NUL
\Device\NUL
Compile and run
You can check my profpict, it works
Christian
Win10
Christian
I trust you
Christian
I’ve to sleep now, I’ll tell you tomorrow
Anonymous
Our College is conducting a college level Hackathon, and I'm a fresher and don't know what to do same with my team, can anyone guide me a perfect project with solution so that I can get some knowledge?
Anonymous
Anonymous
games?
Anonymous
games?
Solutions for general problem may be good(my personal opinion)
Captain
😱
\Device\NUL
Because long not equal to long int
So, what data types that equal to long ?
Anonymous
for example?
That's what I need
Ilia
You sure that %ld is the code for long? long ≠ long int
long == long int (often both 32bit) long long != long int (64 != 32)
Ilia
long nc; nc=0; while (getchar() != EOF) ++nc; printf("%ld\n", nc);
after you write your input push enter and then ctrlZ (windows) then enter again. I think that you are in loop all the time
\Device\NUL
If you have data types size problem just use macro from stdint
Ilia
long nc; nc=0; while (getchar() != EOF) ++nc; printf("%ld\n", nc);
yes i was right. You are inside loop. This code works properly
Tran
Has anyone learned openGL yet?
Roman
Hi, i have a macro MULT(x, y) x * y but when i try printf("%lf", MULT(3.1, 2.7)) it prints: 8.00(incorrect). What's the reason?
Roman
Because x and y in the function macro is integer ?
there is no type annotation in the macro
Roman
#define MULTIPLY(x, y) x * y
\Device\NUL
there is no type annotation in the macro
Hmm, try to see the what compiler produce from -E flag
\Device\NUL
I got correct output on clang
Roman
I got correct output on clang
Me finally too, mistake was type alias, i was thinking that it is double, but it's int, sorry for that
Artur
Has anyone learned openGL yet?
Time to go for Vulkan a bit late for OpenGL 😅
Spirit
Time to go for Vulkan a bit late for OpenGL 😅
I need someone to download 5 years of OpenGL experience in my head lol
Artur
Actually OpenGL itself is extremely simple
Spirit
Yeah Vulkan would be great to stay ahead of the curved, but OpenGL isn’t going anywhere anytime soon. I’m sure eventually there will be a transition period tho.
Spirit
I imagine getting used to any graphics programming, would make trying a different api that much easier, like the equivalent of learning Italian after learning Spanish.
Artur
Transition period is already happening, yes OpenGL will stay for a while, perhaps it’s even good to learn at the beginning, but if you want to work in the industry welcome to Vulkan
Artur
I will use a chance to showcase one of my really old projects 😅 https://m.youtube.com/watch?v=GLDeNukaibY
Spirit
I was reading some stuff the other day about how more than likely, the gaming industry is more likely gonna adopt vulkan/OpenGL compatibility/translation apis rather than full fledge switch over of all their tools. And graphic card companies are essentially gonna be lead by the gaming industry. So either would be fine to learn for the next 10 years. Tho personally I’d rather get in on Vulkan now.
Spirit
Except I’ve mostly been focusing on apple the last year so if anything I’ll probably be messing with Metal before anything else… also fuck apple…. I wish I didn’t find their UI pretty
Gilded
can anyone please send screenshot of executing this code in right way? https://telegra.ph/file/5f5a8782d7a03a17ee8ef.jpg
Sardor
I search flutter senior developer.
Anonymous
Icloud invoice package world wide with method how to unlock
Gilded
can anyone please send screenshot of executing this code in right way? https://telegra.ph/file/5f5a8782d7a03a17ee8ef.jpg
#include <stdio.h> int main( ) { int val[7] = { 11, 22, 33, 44, 55, 66, 77 } ; for ( int i = 0 ; i < 7 ; i++ ) { printf("val[%d]: value is %d and address is %p\n", i, val[i], &val[i]); } return 0; }
Gilded
val[0]: value is 11 and address is 0x7ff7bfeff310 val[1]: value is 22 and address is 0x7ff7bfeff314 val[2]: value is 33 and address is 0x7ff7bfeff318 val[3]: value is 44 and address is 0x7ff7bfeff31c val[4]: value is 55 and address is 0x7ff7bfeff320 val[5]: value is 66 and address is 0x7ff7bfeff324 val[6]: value is 77 and address is 0x7ff7bfeff328 Program ended with exit code: 0 is this right?
Gilded
why 31c is printed in middle
Captain
why 31c is printed in middle
Coz its hexadecimal
Gilded
#include <stdio.h> int main( ) { int val[7]={1,2,3,4,5,6,7},i; for ( i = 0 ; i < 7 ; i++ ) { printf("val[%d]: value is %d and address is %p\n", i, val[i], &val[i]); } return 0; } or #include <stdio.h> int main( ) { int val[7]={1,2,3,4,5,6,7}; for (int i = 0 ; i < 7 ; i++ ) { printf("val[%d]: value is %d and address is %p\n", i, val[i], &val[i]); } return 0; } which is right
\Device\NUL
It can be changed
Gilded
Address is not static
changes with compiler?
Gilded
No
then changes with which
\Device\NUL
then changes with which
It depends on where memory region that kernel allocated
Gilded
It depends on where memory region that kernel allocated
can you send detailed info of this variation
Gilded
xcode prints this program ended in same line how to do it in last new line?
Alviro Iskandar
why 31c is printed in middle
there is no guarantee anything on this, the value 0x7ff7bfeff31c is not relevant with program behavior, it can be random, even executing the same program can still get it random due to ASLR
Anonymous
hello everyone
100$ website
f
Knight ️
Please I need help I wrote a program in C on operators , division, addition, subtraction but they're all giving me the same value as output
'''''''
Pass the values of x and y in the main function and pass array as a pointer
100$ website
whats that
Liam
/ban spam
ohh, I have a wtf experience just now.
I compile with release, it works