Questions tagged as 'c'

1
answer

Doubts in solving an exercise using while or for [closed]

Good evening my dear, My question is about repetition (while and for). In an exercise I want to print the numbers from one to 10. But I want to group them 2 by 2 or 3 by 3 to follow this logic: 123 456 789 ... Thank you very much f...
asked by 25.05.2016 / 02:43
2
answers

reset problem in C code [duplicate]

I would like help with the code I have a problem that follows in the image: I'musingthiscode:#include<stdio.h>#include<stdlib.h>intmain(){floatCP,LP,PP,LA,AA,AT,AAZ,PL,PC,FP;intQA;printf("\nDigite os dados da picina"); printf (...
asked by 27.04.2014 / 18:34
1
answer

id returned 1 exit status in C

My code gets this error and I do not know what's wrong: #include<stdio.h> // printf, scanf // Função principal int main(void) { // início do programa principal // Declaração das variáveis locais unsigned int Dias; // soma total dos dias...
asked by 06.06.2016 / 00:31
2
answers

Strict Aliasing of the c [closed]

Galera would like someone to explain this Strict Aliasing, and with cast examples, I saw in a book I did not understand.     
asked by 21.04.2016 / 02:50
1
answer

Variable declaration problem to compile in Code :: Blocks

#include <stdio.h> #include <locale.h> #include <string.h> int main () { setlocale (LC_ALL,"Portuguese"); int num,escolha; char nome[20]; printf ("\nDigite seu nome: "); gets (nome); printf ("\nInforme u...
asked by 12.06.2016 / 23:01
3
answers

Read multiple numbers of scanf separated by space

I need to make a program that receives a number of elements of a vector, and then each element of that vector, but in the same% with spaces. Only I do not know how to do this, someone can help me. Example: 3 1 2 3     
asked by 22.05.2018 / 01:08
2
answers

Convert character

char converte_minusculo (char *s) // porque esta errada { int posicao = 0; while (s[posicao] != 'char converte_minusculo (char *s) // porque esta errada { int posicao = 0; while (s[posicao] != '%pre%') { if(s[posicao] &g...
asked by 11.05.2018 / 19:44
2
answers

how do I save the data entry permanently [closed]

I want to create a program in C where the user enters his name and it is saved permanently, but the user name is only saved until the program closes. How do I make the program leave user data permanently saved?     
asked by 23.12.2015 / 18:06
1
answer

How to convert a Char String, storing in an Integer vector in C? [closed]

How to convert a Char String and add to an Integer vector?     
asked by 16.10.2017 / 23:06
1
answer

How to make an algorithm that receives the name of a day of the week and shows the subject that the student has on the [closed]

I'm not sure what to do, but I do not know what to do, but I do not know what to do. to do in C. "Develop a C program that receives a day of the week and shows which course (s) you have on that day of the week"     
asked by 24.10.2017 / 14:33