Questions tagged as 'c'

0
answers

Boyer-Moore algorithm error

I'm studying how to count how many times a string appears in the other, and I found that site Link of the site , it has the algorithm of Buyer-Moore, which finds number of occurrences of a in b, but only that when I pass the values the function...
asked by 06.09.2018 / 13:29
1
answer

Problem with struct: "Expected expression before"

The following problem    expected expression before 'eqp' in the line of the function 'data' where the value is read and I could not identify the reason for it. #include <stdio.h> #include <stdlib.h> #include <locale.h>...
asked by 19.09.2018 / 20:13
0
answers

Doubt program that copies from one file to another in C with functions

I have to do a job in C which makes copying from one file to another at launch time (on linux using argc and argv). I'm not very accustomed to file manipulation, but here's the code and it's not working, what can I do to make it work? I did thes...
asked by 19.09.2018 / 21:08
0
answers

When printing string, nonsense characters are displayed [duplicate]

I need to do a program that calculates the average salary of a company, asking the user for the number of employees, the name and salary of each employee and returning the average, the name of the employee with the highest salary and the name...
asked by 09.09.2018 / 22:06
0
answers

Problem String Language C [duplicate]

I can not understand why the program does not run the scan. Can anyone help me?     
asked by 09.09.2018 / 15:15
1
answer

How to read a file in C but not count the header in the counter?

FILE THE FIRST LINE IS THE HEADING THAT I WANT TO DISCONTINUE. So that the counter "num" does not begin counting from the HEADER Company About Name Function CompanyA Bedecs Anna Owner CompanyB Gratacos Antonio Owner CompanyC Axen...
asked by 09.09.2018 / 21:11
0
answers

Difference between switch and if in C [duplicate]

When I know when to use switch and when to use if in c? what are the limitations? switch accepts conditionals and loopbacks within it?     
asked by 31.08.2018 / 03:20
0
answers

Condition error in string vector in C [duplicate]

I'm having difficulty with a specific exercise: #include <stdio.h> #include <stdlib.h> #include <locale.h> #include <windows.h> #include <ctype.h> #include <string.h> /* run this program using the console...
asked by 06.09.2018 / 21:19
0
answers

How to compare strings in C [duplicate]

Hello, I would like to know how Strings compare to C with the "==" operator. I program in Java, and to compare Strings, we use the "equals" Example "myAttribute.equals (" Text to be compared ")" In C language, can I use the "=="? When can I us...
asked by 31.08.2018 / 00:55
4
answers

How to convert a char to an integer?

Converting a string to an integer with the atoi() function is easy, is not it? However, when I use the atoi() function to convert a character to an integer, the program that is at runtime simply crashes. What would be...
asked by 01.04.2018 / 23:53