Questions tagged as 'c'

1
answer

How to send email in C?

I've researched multiple sites and google, but I always have something with PHP or HTML. How to send an email using only C?     
asked by 01.02.2014 / 04:39
1
answer

How to return vector size with sizeof ()?

This is the code I'm using, but the return of the tamVet function is not the size of the vector, but the size of the pointer over itself. #include <stdio.h> int tamVet(int *vet){ int tam; tam = sizeof(vet) / sizeof(vet[0]);...
asked by 17.09.2014 / 23:10
4
answers

How to test the condition on a vector?

I have to do a program that reads a text, where each first letter of each word of the text is replaced by a character (*). I can not compile correctly, I believe the problem is in my condition ( if ). #include <stdlib.h> #include &...
asked by 21.09.2015 / 00:37
3
answers

Utility of #pragma

Several C / C ++ codes have the word pragma . Depending on the way it is implemented it has a different function. #pragma once #pragma pack () #pragma comment (xx, "")    For what purpose has pragma been made?       W...
asked by 28.09.2016 / 21:58
1
answer

Whenever I'm scanning a string in C I should use "strlen ()", right?

It is common to see in C executions that people need to parse and / or manipulate the contents of a string , so we need to be sure that it will not exceed its limit. It is very common to make a for ranging from 0 to strlen() - 1 ,...
asked by 24.11.2016 / 12:53
3
answers

How to measure the complexity of an algorithm?

Hello everyone. I need to know if my algorithm meets the demand of the following statement: "Implement an algorithm with complexity O (n) that realizes the factorial of a number x such that x belongs to the Natural." #include <stdio.h> /...
asked by 20.02.2016 / 17:57
1
answer

What is MUSL? What are the pros of someone be carrying it to my laptop?

I'm interested in the pros that this can bring to my laptop.     
asked by 08.01.2018 / 08:59
2
answers

When to use "inline"?

Everyone says that you do not have to use inline in the functions since the compiler knows what to do better than the programmer. But if it has in the language it should serve something. Is it useful in any case? When to use it then?...
asked by 14.02.2017 / 13:47
2
answers

How to convert binary to decimal?

I had to do a huge equation to convert a binary number into a decimal. What is the best way to do such a conversion? For example 0011 1011 0101 = 949 At the suggestion of Jorge B., I am putting my conversion attempt, just for illustra...
asked by 15.09.2016 / 09:44
2
answers

How to make my C ++ programs multi-architecture (32 and 64 bits)?

Developing a native C ++ application using DevCPP and the MinGW compiler, when running the application on another machine I noticed an error regarding architecture, because my program only runs in 64-bits, how can I make it multi-architecture? T...
asked by 22.07.2016 / 18:26