Questions tagged as 'c'

1
answer

Format the output of System () in C

I simply have an ascci art that I show with different printfs and I want to put in the middle the name of the user. (with the name I mean the windows user). I thought about taking out the name with a System ("whoami"), which works for me but...
asked by 30.05.2018 / 04:01
1
answer

Error: assignment to expression with array type

I am reviewing the pointers in c, millions of years ago that I do not touch them and I need to use them, reviewing the programming book in Schaum c, chapter 10 pointers pag. 372, example 10.22 propose a sum of two matrices with notation of point...
asked by 09.01.2018 / 15:39
1
answer

Animation in C, with Graphics.h

I'm doing a task animation, based on images with putpixel, I use setvisualpage, and setactivepage for the blinking it has when it comes to displaying and removing an image. The fact is that now I want the animation to move faster, will there be...
asked by 30.11.2017 / 05:48
1
answer

Difference between Struct and an incomplete Struct type

When declaring these two struct, what are their differences? Do the fields change from where they can be invoked? Struct general: typedef struct Etapa{ int h, m, s; }Etapa; Etapa etapas[3]; Etapa *puntero_etapa = e...
asked by 14.09.2017 / 16:35
1
answer

How the reserved memory works for a string in C

I had a doubt about the chains in C, in this the chains are an array of chars but the way to work with them is to save only the memory address of the first character, thus advancing in the memory address, considers that the string terminated whe...
asked by 14.05.2017 / 23:52
4
answers

root of a number

I would appreciate if someone could check my code, I just need to know why the function always returns r = 0. What my program does is through a series of operations calculate the root of an integer A, having previously entered this number and a...
asked by 21.08.2017 / 21:57
3
answers

Doubt reading file in C

Good morning, my question is as follows. I have a flat file called group, in which all linux users are shown. My problem is that I need to read each of the lines in the file and show the group's identifier and its name on the screen. Something l...
asked by 15.03.2017 / 12:31
3
answers

Why is not the array ordered correctly in c? [closed]

When I run the program it shows me the array created correctly, but the problem is that it does not command it. I do not know if it will be a problem of how I pass the arrangement as a parameter to the functions, since I am learning and it still...
asked by 27.01.2017 / 15:37
2
answers

Validate positive integers

I need to perform the data validation in c of the following program. My question is, how do I validate so that the program only accepts positive integers? The code of the program is as follows, but I do not know how to make the program not ac...
asked by 18.02.2017 / 14:59
1
answer

Crashea program when using scanf on float matrix

I am learning to program in c. I'm looking at the topic of structures and pointers. The following program should create a structure with a pointer to pointer type float and save numbers in it. However, the captures crash when the number of row...
asked by 02.04.2017 / 00:17