Questions tagged as 'c'

1
answer

change number 3 in line [closed]

I have to do a tic-tac-toe and I do not change the file in the site that is chosen and I do not know why I leave the code here, thanks in advance #include<stdio.h> #include<stdlib.h> #include<conio.h> int main(){ char...
asked by 20.05.2018 / 20:51
1
answer

Simple linearity problem in C

I have a question about this procedure. Could this exchange of variables be simplified without using an auxiliary variable? Practicing with pointers I came up with this dilemma and I do not know another solution to this problem. The idea is t...
asked by 14.07.2018 / 18:33
1
answer

Do-while repetitive structure in C language [duplicated]

I'm having problems with this Do While repeating structure. I need to ask the user for a whole number and make the multiplication table of that number from 1 to 10, then ask if you want to consult another table. If you press the s key, you do...
asked by 11.04.2018 / 14:13
1
answer

C - Modify a struct from a file

I just started with C and I have no idea the truth. The thing is to make structs and put them in a file and then read and modify them. I have no idea how to modify a struct of the particular file. I hope you can help me, I'm a little bad at this...
asked by 02.04.2018 / 03:00
1
answer

"Segmentation Fault" in Double Linked List

I hope you can help me visualize the error in the following code. I've been studying all types of lists lately. In this program I focus on inserting an element at the beginning of a DOUBLY LINKED list. As soon as I started studying these type...
asked by 04.04.2018 / 03:37
1
answer

How do I change the color pixel in C language? [closed]

I know that nowadays there are easier ways to draw on the screen, but I want for a minute not to abstract myself so much and understand what would be the most basic way of drawing on the screen considering that I am working on C. I thank you...
asked by 26.02.2018 / 22:25
1
answer

ABB: Values are not printed when traversing it

I have this implementation of a binary search tree in C; I have to do 3 routes in it: preorder, inbound and bidder. The problem is that I do not print anything and the code has no errors, I guess what is wrong is my logic, but I can not find t...
asked by 19.02.2018 / 05:52
1
answer

Sum of two numbers in floating point by inline function asm in C

I am working with gcc in linux, I have an implementation of an asm inline function, which adds two numbers in floating point and returns them by reference in the variable r also passed as a parameter, compiles but the result of the sum is 0.0 ,...
asked by 12.01.2018 / 03:30
1
answer

Assign variables from string entered by keyboard in C

I need to achieve the following: The user will enter the following command by keyboard: cousins entry.txt -t -n 5 Where cousins is the exercise, input.txt a file that contains numbers, -t to indicate that threads will be created, a...
asked by 04.11.2017 / 17:17
1
answer

Read binary files in C (fread Matlab)

In Matlab I have a binary file read like this: fid = fopen('nombrearcihvo', 'r', 'ieee-le') the contents are short floating, or 32 bits (4 bytes) and to read the first element I use the following: fread(fid, 1, 'float32') And throws me...
asked by 06.11.2017 / 18:34