Questions tagged as 'c'

2
answers

Error compiling C program in ubuntu

#include <sys/stat.h> #include <stdlib.h> #include <stdio.h> #include <pwd.h> #include <grp.h> #include <time.h> #define N_BITS 3 // argc : Cantidad de argumentos (Contando ejectuable); // argv : Array de char*...
asked by 14.10.2016 / 00:01
1
answer

Obtain the unique ID or serial number of the processor using C in Linux

How can I get the serial number or the CPU ID using C in linux? is #include <cpuid.h> occupied? A sample code would be very helpful. Thank you.     
asked by 30.11.2016 / 20:24
1
answer

Read a two-dimensional array (matrix) using scanf

I've tried the following code: scanf("%d %d",&N,&M); int matrix[N][M]; for(int i=0;i<N;i++){ for(int j=0;j<M;M++){ scanf("%d",&matrix[i][j]); } } but when executing it does not stop asking for data, the p...
asked by 24.09.2016 / 21:59
1
answer

Problems with C File

Good afternoon! I have the following code in C: #include <stdio.h> #include <stdlib.h> #define tamString 100 void cargarArchivo(FILE * archivo, char phrase[tamString]); int main() { FILE *archi; archi = fo...
asked by 27.05.2016 / 21:31
1
answer

Doubt about strcopy

I would like to know what the real feature of strcopy is from the string.h library and what does this C method do, I think what is in a set of characters is copied into a pointer from another set of characters. But I would like to know exa...
asked by 28.04.2016 / 10:55
1
answer

Binary not found

I do not know much about the C language but I'm testing some classes, and I have a makefile file, but when I give Build All in the project, and I give Run as C application I get this: I do not know what to do, I've already touch...
asked by 21.05.2016 / 20:55
1
answer

include external libraries in qtcreator

I need to include external libraries to an application that I have in Qt Creator. In my case I need to include the library xmpp but I do not know how I am new to this idea and I do not have much idea. I read a tutorial online but I did no...
asked by 19.08.2016 / 12:55
1
answer

Copy and sort matrix in C

I am learning C but I am still very new. I face the following problem: given a square matrix I must copy it in another matrix and order it as follows: For example, if I work with this input matrix: {0,0,0,0,0,0,0,0,0} {0,0,0,0,0,0,0,0,0} {0,0,...
asked by 05.01.2019 / 05:44
2
answers

Problem with program in C, scanf does not respond

I have the following code in C: #include <stdio.h> #include <string.h> struct alumnos{ char nombre[10]; char dni[20]; int edad; }; int main(){ struct alumnos myAlumnos[2]; char opcion[20]; char salir[20] = "salir"; int i,status;...
asked by 13.07.2016 / 07:35
2
answers

Delete list item FROM recursively

I have to delete the elements recursively from a list doubly linked from last to first. In addition, it has a pointer at the beginning and another at the end. I do not know what the error is. void eliminar (lista DE, PPF){ if (DE==NULL)...
asked by 15.11.2018 / 00:37