Questions tagged as 'string'

0
answers

Return string array in c

I'm trying to return an array of strings to use later in main. Here is my function: char **separar_palavras2() { setlocale(LC_ALL, "Portuguese"); FILE *arquivo; arquivo = fopen(ftexto, "r"); int i = 0, j = 0; char* linhas[50]; char line[200...
asked by 27.12.2017 / 02:20
2
answers

C program, how do you print the word without the character?

IcannotprintthewordwithoutthecharacterandIhavenoideahowtoexecutetheending.ifanyonecanhelpfollowwhatI'vealreadydone:#include<stdio.h>#include<string.h>intmain(){charfrase[20],nova[20];charcaracter[1];intx,y;printf("Informe a frase: "...
asked by 17.12.2017 / 21:00
1
answer

Type error: not all strings converted during formatting

I'm trying to make a couple or odd game. The problem is that every time the sum of my play with that of the computer gives 'par' this error message appears. I've tried other types of formatting and the same error always appears. Also, this line...
asked by 18.12.2017 / 01:22
1
answer

Use toLowerCase () in an array of strings - AngularJS 5, TypeScript

I am trying to transform an array with strings inside in lowercase using toLowerCase, but it seems that it does not work with an array and only with a string ... How do I solve this? items: Array<{tag: string[], image: string, page}>; t...
asked by 25.11.2017 / 04:32
1
answer

Calculate a string in Python

I would like to do a calculation of a string that I get, for example: var = '1+2' I wanted to convert this string into an account, to return 3 for the variable var and not '1 + 2', but this would not only be added, would have subtrac...
asked by 16.03.2017 / 15:50
1
answer

Include spaces when reading strings in C

Good people I have a C job to do, in which I have to read information from a lot of different txt.com entries. Each string follows the following format: 12345António Manuel Silva Mendes Frankfurt Varsovia 1 The...
asked by 06.12.2017 / 18:31
1
answer

Error while in joption pane: loop

I'm having a serious problem with the while in the following algorithm: You have a data set containing the height and gender (male, female) of 50 people. Make an algorithm that computes and writes: 1 - the highest and lowest height of the gro...
asked by 07.12.2017 / 02:33
2
answers

Two strings starting from one in C

Hello, I need software that reads a full name, consisting of a simple name and a last name, separated by "_" and printed separately. The code should use the following main function: #include <stdio.h> int main(){ char nome[30];...
asked by 29.11.2017 / 04:36
2
answers

How to validate an upload by filename?

I'm trying to validate the upload of a file, and it should always be called new.mpg , otherwise the program will not work. function validarNomeArquivo(){ //variavel que recebe o nome do arquivo var oImg = "bgs/newFile.mpg";...
asked by 30.11.2017 / 17:31
2
answers

Error .class expected

The program is supposed to ask for a number between 1 and 12. (I have not yet got the part to certify that it is between 1 and 12 but this is the easiest one. However it is supposed to write the code through functions (not that I I do not know h...
asked by 11.11.2017 / 01:22