Questions tagged as 'c'

1
answer

Comment count function and other program by command line in C [closed]

I'm having trouble knowing how to develop a function that the command line will count and display the number of commented lines from another program in .c, for example: Counter ProgramExample.c -c The -c argument will call the function to...
asked by 14.04.2014 / 22:43
2
answers

how do I print the smallest height read? [duplicate]

int sexo = 1; float maior=0,menor=0,altura; int tm = 0, tf = 0, sm = 0, sf =0; printf ("O valor 0 encera o programa !!!\n"); while (sexo!=0){ printf ("1-Masculino\t2-Feminino\n"); scanf ("%d", &sexo); if (sexo =...
asked by 07.12.2018 / 00:35
1
answer

Get size of a two-dimensional array

I have a two-dimensional array of char dynamically allocated, how do I get its size? I would use sizeof (client); For example, I instantiated a struct client, Customer ** customer; then in the code I'm allocating it as it goes (tamVetor ++...
asked by 01.07.2018 / 02:57
1
answer

How do I if the user enters a number other than 1 and 2 he asks do you want to end the program? \ n [1] for yes and [2] for no

If the user types a number other than 1 and 2, he asks to terminate the program? \ n [1] for yes and [2] for no #include <stdio.h> #include <stdlib.h> int main() { int N1, N2, Q, R, OP; { do { printf("DIVIDINDO...
asked by 12.06.2018 / 15:22
1
answer

Some test that this code does not pass [closed]

I'm asking the question Voice Dialing , I've done all the possible tests and I do not find the error could help me in other tests that my code fails My code #include <stdio.h> #include <string.h> #include <ctype.h> int i...
asked by 02.06.2018 / 02:13
1
answer

Vector union

How do I join 2 vectors in 1 vector? Without repeating the numbers? Question: Make a program that reads two vectors of 10 elements. Create a vector that is the union between the 2 previous vectors, that is, that contains the numbers of the tw...
asked by 21.10.2017 / 21:31
1
answer

Questions about strings

I have the proposal to print on a theater ticket, the date, time, part name (to be typed and scanned by scanf), and the customer's seat number // declaração da variável. char PecaTeatral[255]; // pulando para a leitura da string switch(n){...
asked by 17.10.2018 / 08:50
1
answer

Function insert end list on

I'm not able to develop this function. bool inserir_fim (tipo_lista * p, tipo_lista * novo_no) { }     
asked by 19.04.2017 / 15:20
1
answer

Repeat loop for [closed]

My code is only printing the last case. Could anyone help me? My Code ... include<stdio.h> int main(){ int teste,total,i; float percentpop,percentgeral,percentarq,percentcad,renda,pop,geral,arq,cad; scanf("%d",&test...
asked by 04.10.2018 / 21:17
1
answer

Program.exe stopped working

I'm doing a program that captures the complete name of a person and reproduces it in this format: surname, name without surname (EX: João Carlos Cunha -> João Cunha, Amanda Batista -> Batista, Amanda). Only the user can type as many names as he...
asked by 16.07.2016 / 14:23