Aakriti Sikhawat
Hello.... can any one help....???
Mat
Ask and wait
Aakriti Sikhawat
Just read two strings instead of one
What if I want to print my full name in one single line... How can I do that...?? See line 302
Dima
What the hell
Aakriti Sikhawat
300*
Sid Sun
Anonymous
Hello, here's a snippet of a program I was writing scanf("%d",&input); while(1){ if((input%10)==0) // do something If I print the value of input right after scanf, I'm getting the correct value, but after the while+if portion, printing input is giving me 0. Not understanding what's going on
Aakriti Sikhawat
Why not use a big array, then use for loop for input.
Because I am working with DMA... so I don't want to use array...
Anonymous
char name[35]; int i; for(i=0; i<35 && name[i] = getchar() && name[i] != '\n'; ++i); name[i]=0;
Anonymous
Aakriti Sikhawat
Bhai Tu Hindi bol le..
Aakriti Sikhawat
Where and why should I need to forward that
Aakriti Sikhawat
Anonymous
Bhai Tu Hindi bol le..
Read the rules English only
Anonymous
Anonymous
Why?
1) magic constant — 35
Anonymous
2) complex for loop condition
Anonymous
3) i declared before loop
Aakriti Sikhawat
Can anyone help me out with mine problem.
Aakriti Sikhawat
??
Dima
No
Anonymous
1) magic constant — 35
That's just for example.
Anonymous
3) i declared before loop
To assign that last value to 0. Otherwise it'll output unwanted garbage buffer values
Aakriti Sikhawat
No
OK... Grandmaa
Dima
Anonymous
I have. First I thought I'm reassigning input to 0 on that if clause maybe, but I'm not using assignment operator
Anonymous
Can anyone help me out with mine problem.
Modify and use the for loop I mentioned. That can be made better. For instance (c=getchar())!='\n' can be put as one instead of the way I did
Aakriti Sikhawat
Debdut.. Share the photo of your code.. I can help
Anonymous
No photos of code lol
Anonymous
It is forbidden
Aakriti Sikhawat
It is forbidden
Why it's so..??
Anonymous
Why it's so..??
Read the rules
Anonymous
Why it's so..??
Because it's disgusting
Anonymous
Lol I'd better use git gist.
Anonymous
Fixed. My calculations on other places were incorrect. Sorry to bother
Anonymous
Anonymous
BILLIONARIESLEGACY , yours one, solved?
Anonymous
https://gist.github.com/dbdtchkrbrty/182fe1b2a03d7a650cf7378dd7203b76
Anonymous
https://gist.github.com/dbdtchkrbrty/182fe1b2a03d7a650cf7378dd7203b76
BILLIONARIESLEGACY Not the complete one. Just the part you wanted.
Err0rX
hey there i have two loops that i want to run them parallely in c, is there any way, i already search on web but doest not find any suitable answere(in c)
Anonymous
C is garbage
Anonymous
For the most part
Anonymous
For the most part
I was going to attack you lol
Anonymous
What?
For saying 'C is garbage'
Aakriti Sikhawat
For the most part
If you can't help.... Then why are you bitching bro.
Err0rX
you might be right but i just started to learn c, and curious about run the loops in parallel at a same time , is it possible
Anonymous
For saying 'C is garbage'
The only use case of C is platforms where there's no C++ compiler
Anonymous
C++ is much nicer
Anonymous
you might be right but i just started to learn c, and curious about run the loops in parallel at a same time , is it possible
No. Not possible. Unless you're using two programs, doing the one thing you want it to. In that case you'll also have to figure out a way for those programs to communicate between themselves
Anonymous
But C++ has two options for that
Err0rX
btw i searched on web something called multi threading, and on one post some one is saying rtos.h —> this header file i need
Anonymous
But C++ has two options for that
As a first language would you raccomend c++ or some other language?
Anonymous
They just are not built in
Anonymous
There are tools for parallel computing in C
None in the standard library.
Anonymous
Ofc
Anonymous
I see thank you