Questions tagged as 'c'

1
answer

How to order and print a list in C?

My question is how do I print the list of the 10 best students ( no students ) first I would have to sort the notes with a loop lower than 10? it has to be yes or yes with qsort ()? As I do to print the names of the students (not the numbers of...
asked by 31.10.2016 / 03:53
1
answer

Solution to a code of a function without reference

#include <stdio.h> #include <string.h> #include <unistd.h> #include <stdlib.h> #include <sys/wait.h> #include "dummy2.h" int exit_code=0; void main(int argc, char *argv[]){ int primero=atoi(argv[1]); int seg...
asked by 04.01.2017 / 13:06
1
answer

Play Sounds in C or C ++ Unused Allegro Library [closed]

How to place sounds in midi , wav format, without the use of the Allegro library in C languages or C ++ ?     
asked by 04.11.2016 / 02:50
1
answer

Unable to convert 'char * (*) [10] [81]' to 'char *'

Well, my problem is this: When trying to compile this code in linux (gcc server.cpp -o server ): #include <stdio.h> #include <stdlib.h> #include <iostream> #include <sys/types.h> #include <sys/socket.h> #inclu...
asked by 18.10.2016 / 12:17
1
answer

have FORK return two results of different commands

if (fork() == 0){ execlp("date","date",NULL); execlp("ls","ls",NULL); } I need to enter the date and list the files but it only shows me the first one that would be the date     
asked by 06.05.2016 / 09:07
1
answer

Torres de hanoi

I have been trying to make my hanoi towers program, which allows the user to select the movement that will do, in principle it works well, but as it progresses, it does not allow to make the changes, I think not I am correctly using the counte...
asked by 11.04.2016 / 00:11
1
answer

Is the following use of "return 0;" correct?

Within a C programming course that I am taking, enter the loop section (while, do-while, for, etc ...). And within one of the practices had as goal to achieve that in the last printf in which prints the numbers entered by the user, whe...
asked by 02.01.2019 / 22:45
1
answer

Assign a variable array of characters to a new variable [duplicate]

I'm trying to assign the array to another variable to get one of the specific characters, by a pointer int main(){ char id[10]; char *idn[10]; FILE *in; fscanf(in,"%s",id); idn[10]=&id[10]; printf("%s\n",*i...
asked by 17.04.2016 / 02:53
0
answers

In which minix operating system file is the proc structure of the proc.h file filled?

What I want to do is add a p_uid variable of type uid_t to that structure and fill it with one of the data of the mproc structure called mp_realuid     
asked by 13.12.2018 / 13:03
0
answers

Array using i2C

Is it possible that a data thrown by a sensor (the data thrown is unsigned char ) using the command i2c_read() , dato=10101010 , be saved in a array as datoarray[8]={1,0,1,0,1,0,1,0} instead of as type unsigned...
asked by 08.12.2018 / 22:08