Questions tagged as 'tipagem'

0
answers

Does typing in PHP interfere with application performance?

Out of curiosity, and for using it a lot without knowing it right, if necessary, setting the variable type is something I do in 100% of my code. It is usually defined by something like this: class classe { private $dado; public fu...
asked by 17.08.2017 / 18:19
4
answers

Type of the CPF or CNPJ field in the VARCHAR or INT database?

What type of CPF or CNPJ field in database VARCHAR or INT ? I've seen some posts suggesting to use INT to optimize performance in JOIN and filters. If you have 0 on the left, you can only complete it according...
asked by 22.01.2015 / 14:51
1
answer

Error fetching dynamic typing value

I'm having trouble collecting the values in a dynamic typing in C. Values entered as char , const char * , int , void * , and long int work perfectly when placed in printf (prints the value without passin...
asked by 23.02.2017 / 22:14
4
answers

Mathematical division needs

On the Windows calculator: 9 / 3,0001 = 2,999 ... In my program: 9 / 3,0001 = 3; I would like to get this level of precision using C. See excerpts from my program: double op(double num1, double num2, char c) { if(c == '/')...
asked by 25.10.2014 / 18:23
1
answer

"Dynamic" data type is not of the same type as the native

I'm trying to create a struct that has one of its attributes having its dynamic or varied data type, I need (when running the struct constructor) to define its data type, and it should be the same as the native one because when I I'm trying to d...
asked by 20.06.2018 / 20:46
2
answers

Type suitable for use with CPF is numeric or character?

I have a database with two tables that store the CPF. In one of them the CPF is stored as numeric(11,0) and in the other the CPF is stored as character . If there is any difference, which of the two data types takes up more stora...
asked by 26.09.2017 / 20:53
2
answers

Why use Int where Byte or Short? [duplicate]

Why not use the primitive type byte or short to store a person's age instead of using type int ? Do the two mentioned consume less memory? Would not that be better?     
asked by 05.01.2016 / 17:51
3
answers

Using data type modifiers

Interestingly, I really wanted to know why data type modifiers are not so widely used. It is said that the modifiers are used to "efficienize" program performance, since you specify to the computer exactly the type of information that will be co...
asked by 13.09.2016 / 21:14
1
answer

Why when I do two operations with integers and save the result in a double it gives me a 0,0 return?

Example: double teste = 673/5455 * 100; System.out.println(teste); It prints 0.0 being that is not the result of the account ... why does this happen?     
asked by 12.03.2017 / 17:56
2
answers

Change a text value through pointer in C

I need to change the values of the variables through their pointers but I can not. #include <stdio.h> #include <stdlib.h> //Programa principal int main() {//Declaração de variáveis e ponteiros int x = 0; int*p; float y = 0...
asked by 26.11.2018 / 16:43