Questions tagged as 'c'

0
answers

How to convert from Hexadecimal to binary

Well actually I got in brute force wanted to know, is there another way to mathematically do my code #include <stdio.h> #include <string.h> int main(int argc, char** argv) { char numero[1000],aux[10000]; scanf("%s", numero);...
asked by 17.04.2018 / 15:59
0
answers

How to create FILA by passing a STRUCT

I'm trying to create a code in which I'll enter 10 candidate names in a queue using a C structure. But I do not have much knowledge in C data structure. I did this: #define TAM 5 #include <stdio.h> #include <string.h> #include...
asked by 18.04.2018 / 18:43
0
answers

dup2 ends with my process

I'm working on operating systems and in our work we aim to create a mini-shell. I'm having trouble with one of the steps related to commands with pipes, in this case I am testing the grep nomedoficheiro.c | wc command. Initially I coun...
asked by 16.04.2018 / 20:27
0
answers

Help with strings read from C file

Well I'm creating a static list TAD, a log file with 4 strings must be read and inserted into the list. Problem encountered in reading the file, where it is described to read ; after jumping a character and so on, however when it reads...
asked by 13.04.2018 / 04:36
0
answers

giving error where it has comments and I do not know the reason

#include<stdio.h> #include<stdlib.h> #include <string.h> struct pessoa{ char nome[100]; }; typedef struct pessoa Pessoa; struct funcionario{ Pessoa f; char cargo[120]; float sal; }; typedef struct funcionario F...
asked by 15.04.2018 / 20:25
1
answer

Change string using function parameter

#include <stdio.h> #include <stdlib.h> #include <string.h> void menu_principal(char* monstro1, char* monstro2){ int escolha; char monstro[20]; printf("King of Tokyo\n\n"); printf("Jogador escolha um monstro:\n---...
asked by 12.04.2018 / 02:37
0
answers

Secure method of reading inputs?

I was doing a search on parameters in the scanf ([\ n] * c, etc ...) and I saw in several places several people saying that scanf was very insecure and should not be used at any time, I read the same about the gets, saying it was unsafe. I would...
asked by 19.04.2018 / 00:04
0
answers

open62541: 'NO_ERROR' undeclared - OPC server - C

I am trying to create an OPC server via open62541 following the example of this link, page 15: link When trying to compile with: gcc -std=c99 open62541.c myServer.c -lws2_32 -o myServer.exe I get the following error messages: open625...
asked by 18.04.2018 / 23:16
0
answers

In what way could I sort this code so that it would print the vector numbers incrementally?

//Questão 4 #include <stdio.h> #define TAM 10 int main() { int i, valorVET, VET[TAM]; printf("Digite os 10 numeros:\n"); for(i = 0; i < TAM; i++) { scanf("%d", &VET[i]); } for(i = TAM - 1; i >=...
asked by 20.04.2018 / 02:36
1
answer

Program for when a structure declaration occurs in different places

Follow the source code ... #define _WIN32_WINNT 0x0501 #include <stdio.h> #include <ws2tcpip.h> #include <winsock.h> #include <windows.h> WSADATA data; struct addrinfo tips, *information; void exaple_one(void); void...
asked by 19.04.2018 / 22:30