A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

What type of variables is an asterisk (*) in C ?

Best Answers

I'm going to go out on a limb here and say that there is a straight answer to this question, both for variable declarations and for parameter and return types, which is that the asterisk should go next to the name: int *myVariable; . To appreciate why, look at how you declare other types of symbol in C:. read more

Maybe, if I understand correctly, an asterisk is not a type, but rather a type modifier, meaning something of “pointer to”. In: [code]int* a; [/code]variable a is a pointer to something of type int. read more

C++ throws a spanner in the works with references, because the syntax at the point where you use references is identical to that of value types, so you could argue that C++ takes a different approach to C. read more

in C++, the following means "allocate memory for an int pointer": int* number; So, the asterisk is part of the variable type; without it, that would mean "allocate memory for an int". read more

Encyclopedia Research

Wikipedia:

Image Answers

C Language Variable Types - dummies
Source: dummies.com

Further Research