Anonymous
valgrind results
Anonymous
@Neko_cpp it sorta works lol
Anonymous
i think valgrind showing me where the issue is
Anonymous
something to do with the comparator function i wrote for qsort
Anonymous
Hello
Anonymous
if you're still having problems with this I can help you debug if you post the program
Michael
Anonymous
What's this ?
n1coc4cola
What's this ?
This is in India's language, no?
01000001011011010100000101101110
Gregory
think you only have C compiler here not C++
01000001011011010100000101101110
think you only have C compiler here not C++
This isn't compatible with new standards of cpp Like Use of iostream instead of iostream.h Here we also don't need using namespace std
RiyAz
Write a c program to reverse linear linked list.
klimi
No
RiyAz
Sample input -10 20 30 40 50 Sample output - 50 40 30 20 10
klimi
As I said.... No
klimi
Do it yourself dude
RiyAz
I tried
klimi
And failed. Thats okay, try again
I_Interface
Write a c program to reverse linear linked list.
/warn asking to do your homework.
I_Interface
As I said.... No
I said warned. xd
I_Interface
Sure
Ow, it is a second ask to do his job...
Ahmed
What's SBS alogrithem any idea ? No any info on Google
Gregory
Hi there! https://app.codility.com/demo/results/trainingX3Q4RK-KES/ How do you think is it issue of the rest 20% is that there is not enough capacity in container? If so, how to solve? This.
klimi
/warn Read the rules
He's already banned
klimi
@Neko_cpp
Francesco
Hello I have a problem
Francesco
(C language) I must create two processes that print their PID and PPID
Dima
so what’s the hitch?
Francesco
And i have to use the system call waitpid for one of them
Francesco
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/wait.h> int main() { pid_t pid, child_pid; int exit_code, stat_val, i; printf("Fork program starting.\n"); for (i = 0; i < 2; i++) { pid = fork(); switch (pid) { case -1: perror("Fork failed.\n"); exit(1); case 0: exit_code = 4; printf("This is the child. PID=%d, PPID=%d.\n", getpid(), getppid()); sleep(1); break; default: exit_code = 0; break; } } //metto il padre in attesa del primo processo figlio creato if (pid) { child_pid = waitpid(pid, &stat_val, 0); printf("Child has finished. PID=%d.\n", child_pid); if(WIFEXITED(stat_val)) printf("Child exited with code %d.\n", WEXITSTATUS(stat_val)); else printf("Child terminated abnormally.\n"); } exit(exit_code); }
Francesco
This my code, but the fork creates 3 and not 2 children
Francesco
And I don't know how can I choice the child that I want for the waitpid
Francesco
Can you help me?
Anonymous
hey
sup
Sher
Hey check this tool out
Sher
https://www.sourcetrail.com/blog/open_source/
Sher
It's great for c++ programmers
Sher
For very long code
Sher
And its free and open source now
Sher
I'm testing it myself now
Francesco
And I can use an array for the choice of PID in the waitpid?
Ludovic 'Archivist'
What's SBS alogrithem any idea ? No any info on Google
It is a category of sequencial selector algorithms
Ludovic 'Archivist'
In short, one of many algorithms to eagerly recognize patterns
qwert
https://www.sourcetrail.com/blog/open_source/
will it work with 300 megabytes of code, 100+ projects and dependencies among them?
Sher
I am not sure, as I said before I am trying out for the first time, before it was paid and closed source, recently it became free and open source
Sher
Its good works well and organises in a easy to understand, even mention namespaces used. I tried with simple GUI calculator randomly downloaded from github.
Sher
Also looks for external header files in source with auto detection feature
Sher
I may try large file next time and give you the results soon
Sher
or later
Sher
This program is also available for 32 bit based PC also Linux
Sher
Bye for Now
Mathur
Guys may i know how to get
Mathur
Input frm user
Mathur
Which is mix of char and int
Mathur
What data type should i use to declare the variable?
Dima
parse it
Pavel
Mathur
For c
Ludovic 'Archivist'
parse it
s/^/try to /
Mathur
Wht data type i should initialize here? Printf("Enter studentd id :") Scanf( ????) I need to get the student id which is like M1055682
Mathur
s/^/try to /
Alright sure
Ludovic 'Archivist'
Wht data type i should initialize here? Printf("Enter studentd id :") Scanf( ????) I need to get the student id which is like M1055682
Read it as a string and write a parser to obtain the actual, potentially invalid, resulting datastructure
Giri
U should use string
I says char array in C
Mathur
Im actually new to programming
Sher
U should use string
I too would suggest string
Mathur
So i have no idea about parser or array i will search and learn it and them i will come back to you guys for futher doubts
Giri
Im actually new to programming
Don't worry ,understand the problem statement...