Questions tagged as 'c'

2
answers

C: Change color of letters (multiple colors on one screen)

For example, I want to start on the same screen: printf(".___. .___. .___.\n"); printf("._1_. ._2_. ._3_.\n"); printf("Digite 0 p/ sair ou outro número p/ continuar: "); But I want the letters of each printf to have different col...
asked by 12.06.2015 / 06:32
2
answers

Display the largest and smallest values between two integers when they are different from each other

I can not display the lower and upper values.    Make an algorithm that reads two numbers and indicates whether they are the same or, if different, show the largest and smallest in this sequence. int V1,V2; printf("Valor 1 :"); scanf("%d"...
asked by 14.09.2018 / 14:33
1
answer

Why am I having access to this pointer even after giving free?

I have this program and theoretically was not to lose the address of new after giving the free making it inaccessible? #include <stdio.h> #include <stdlib.h> typedef struct{ int numTeste; }strPt; int main (){ strPt * new...
asked by 30.03.2018 / 03:32
2
answers

Pointer function?

statement:    A student's grade is calculated from three grades assigned   between the range of 0 to 10, respectively, to a work of   bi-monthly assessment and final examination. The average   three notes mentioned above obeys the pessos: wor...
asked by 17.08.2018 / 17:00
1
answer

How to use the mod in C \ C ++?

How do I use the MOD function in C \ C ++? (N MOD 2) = 0 I have to use this line of my code.     
asked by 03.04.2014 / 18:51
3
answers

Changing the size of the vector in a structure

I have the following structure: struct Implicantes{ int posicao; char binario[5]; bool dontcare; bool tick; struct Implicantes *Next; }; Is it possible to change the size of the vector of char "binary" from 5 to t...
asked by 24.07.2016 / 20:44
4
answers

I need different ways to rearrange characters within a string, how do I do this?

I would like answers in C, C #, or just an algorithm, but preferably an implementation already in the C # language because that's what I'm using. For example, suppose I have to find out if a number is read in the same way both ways - a silly...
asked by 07.09.2015 / 20:57
2
answers

How to perform an algebraic expression on a string in C [duplicate]

My program has the following purpose: Given a function, my program replaces the 'X (s)' of the function with any number. The code below exemplifies what was said. //funcao a ser trabalhada char funcao[150] = "(x^2)*5"; int tamanho = s...
asked by 25.09.2015 / 00:30
3
answers

Problems with "strcpy" locking program

I'm solving an exercise where I have to fill a vector of type struct , and one of the values is char , so I made a while and was using a simple assignment with "=" but was not working , so I did with strcpy but every ti...
asked by 28.08.2015 / 01:49
1
answer

Simplify code

I did a program, based on a study I read. The study says it takes 10,000 hours to get genius / master in any area. Can you simplify what I did? In the menu I only managed to do so, if you give me suggestions I thank you. I really want to lear...
asked by 01.01.2016 / 18:36