Questions tagged as 'c'

0
answers

URI Question 1463 in C, I can not identify the problem in the code

I am trying to solve Question 1463 of the Online Judge URI, link: link However I get the message of 100% error or timeout exceeded, could someone show me what would be wrong in the code below? #include <stdio.h> #include <stdlib.h&g...
asked by 07.11.2017 / 22:48
0
answers

Diagnostics in code retrieving JPG files

In a course exercise I have to write a program that retrieves JPG images from a file. The code below is not ready, but it should find the signatures of JPG (0xffd8ffe0 or 0xffd8ffe1) inside the file jumping from 512 in 512 bytes (FAT) and print...
asked by 07.11.2017 / 21:51
1
answer

What error? strtok C

I made the following code that receives a string of 3 numbers separated by space, then delimits them and allocates each number in an array position, in the end it prints the array, the code works however only without the 7th and 8th ° rows. I wo...
asked by 03.11.2017 / 22:33
0
answers

String Concatenation in Assembly x86

I have to implement a function that concatenates a String3 pointed to by ptr3 to strings pointed to by ptr1 and ptr2. I do the main() in C, and the functions in Assembly x86. When executing, output is 123 and it should be 12345...
asked by 04.11.2017 / 00:52
0
answers

vector / dynamic queue segmentation failure

Hello, the following code is missing targeting. Basically I can not scan this entry: ISCOD4 2 3 10 20 1 10.1.1.151 10.1.2.151 10240 1 2 10.1.1.153 10.1.4.152 12288 2 3 10.1.1.156 10.1.4.153 14336 3 4 10.1.1.156 10.1.2.150 2048 1 5 10.1.1.157 1...
asked by 04.11.2017 / 00:49
0
answers

setlocale in windows codeblock without running right

I have a programming project that was to develop a replica d naval battle game. but I did the whole program on Linux (Ubuntu 16.04) but my teacher uses windows (using codeblocks) and to ensure I was testing the same on windows I already added...
asked by 30.10.2017 / 21:26
1
answer

Matrices and Pointers

Hello, how do I point to a multidimensional array? I know to do this with a vector (unidmensional array), it looks like this: int v[5]; int *ptr = v; I understand this very well, but with an array I can not do that. When I use the same tact...
asked by 05.11.2017 / 03:44
1
answer

Can anyone help me to value the positions of this array with pointers?

Hello, I am in doubt about the following code, it creates a two-dimensional array using pointers, the command line that should assign specific value to each position of the array does not seem to work, because when typing on the screen it appears...
asked by 05.11.2017 / 01:03
1
answer

What is the purpose of call conventions and which one to use?

What are the conventions for calling __fastcall, __stdcall, __thiscall, __cdecl, __fastcall, and how do I know which one to use? For example, in some function that needs to be called faster (I could use inline but I'm avoiding it because of c...
asked by 02.11.2017 / 15:30
0
answers

Concurrent programming

Hello, I'm having trouble finding the error in the code below. It is a problem in which ideally, having 5 available positions, any of the types of threads (server or trainee) can be to sit freely, but when they fill the vacancies, the next vacan...
asked by 03.11.2017 / 18:43