Questions tagged as 'operadores'

3
answers

Operators, order, relevance, read and priority

I came across the following question in a comment of the following    One more question .. The! = operator is the same as < ? So I decided to create an answer by explaining right away to take questions or teach those who do not know....
asked by 12.11.2014 / 14:27
2
answers

Why does not the pointer increase the value?

Here was to increment the value of the variable, but it does not work. #include <stdio.h> #include <stdlib.h> int main() { int *p, x = 10; p = &x; *p = (*p)++; printf("%d \n", *p); return 0; } Result:...
asked by 28.07.2016 / 03:46
3
answers

Code to invert sequence of non-vowels ending with zero status

I'm implementing the decodificar function, which aims to call auxiliary functions to invert all non-vowel sequences. For example, if the word is "legal monsters", it will continue to "mortsnol segais". void inverterNvs(NO* elemento, NO*...
asked by 04.09.2017 / 18:34
1
answer

Does a char type always have size 1?

I've always known that char is the only type that has fixed size by specification. Its size is 1, no matter the architecture. But I came across sizeof('a') returning 4 rather than 1. Like this? Did I Learn Wrong?     
asked by 19.01.2017 / 11:18
1
answer

Precedence of operators with pointers

Having, for example, the following instructions: int i=10, j=20; int *pti, *ptj; pti = &i; ptj = &j; What is the meaning of j = pti == ptj; and i = pti || ptj; ? In addition, I've read that summing the subtraction b...
asked by 03.08.2015 / 14:46
4
answers

Use of & next to Operators and Functions in PHP

What is the meaning of using & with operators and functions in PHP since I checked in some libraries Example and functions this use (I am aware of the use next to variables has relation to the passing of pointers) $browser...
asked by 19.02.2015 / 12:57
5
answers

Store arithmetic operator in variable

I have the following code: $value1 = 10; $value2 = $value1 + 10; // $value2 == 20 I need the + operator to be variable, ie in my case I need to be + or - . I've tried the obvious but it sure would not work, here's the...
asked by 13.11.2015 / 14:34
2
answers

Operator in in java

I'm learning Java and I came across the need for the in operator. For example: I have a vector ( v = {1,2,3,4,6} ) and I want to see if the 5 is in this vector (not in this case). In python it would be v = [1,2,3,4,6] -...
asked by 10.09.2017 / 03:15
3
answers

Difference in the practice of arithmetic and assignment operators

package entities; public class Product { public String name; public double price; public int quantity; public double totalValueInStock() { return price * quantity; } public void addProducts(int quant...
asked by 11.12.2018 / 01:22
2
answers

What is it and what is the function. (dot) in OOP?

A long time ago a teacher defined and explained the function of . in POO (Java Classroom). In time I forgot, but I found it quite interesting, we often think it's just a "dot", but it's not quite like that. So the question:...
asked by 24.02.2016 / 13:36