A string in C is basically a Character Array. And the name of an array always points to the first block of data that it holds. so when I type char a[10] = "Hello"; a always points to the start of the array. So it's the address. Whereas in case of integers int a = 10; a is actually the variable that holds the value. And the address is given by &a
The & is used to provide the memory address of the variable. So for a variable x, its address is &x. In case of strings, the name of the array is infact a point to the string in memory. So mentioning its name as an argument is enough.
c language is very large language. it is very famous language.This is the combination of Cobol and Fotrait language.C language syntax is also clear and use of pointer is very powerful tools.
Hei Mr. kimie4546 please it is not place of joking. Ans: this is very clear ,it is not a variable ,so &(ampersand) is ignored.
Hello Guys. So my conclusion would be if you have a free hand (and there may well be good reasons why this isn't the case), use Visual Basic. If, on the other hand, you've got a team of C or Java legacy programmers who insist on using a language with case-sensitive variables, then let them use Visual C#. All your comment for programming development are welcome. For More Info :- www.aegisisc.com Thanks in advance.
C is father of all language ,and they crate some rules for crating any program.In c language "&" is use for the provide address for particular website,so ypou can nout yse for other use.If use for other purpose you get the error on your program.
Programming in C is one of the thousands of programming languages ​​that allow users to create instructions for a computer to follow. While C has a style a bit more cryptic than other programming languages​​, it is quite easy to learn and lets you read and write code for different platforms. Because it is so efficient and gives the user great control, C is popular among programmers.
I completely agree to what a9entropy has replied. Address-of(&) operator is used to address the memory location of the variable.
In C and C++ * is a pointer and & is a reference and both refer to memory locations, as others have pointed out. There is a subtle difference, that being that a pointer can be changed and is stored in a variable, whereas a reference cannot be changed and is stored in a constant. A pointer also has its own memory address whereas a reference does not. In other words, a reference is more direct, the most direct location of a variable's memory address, whereas you can have pointers to pointers to pointers etc.. So a reference is a memory address's lowest level of abstraction whereas a pointer is a slightly higher level and can have many indirections. A reference is accessed via the full stop '.' whereas a pointer is accessed via '->'. References cannot be put in an array, whereas pointers can. Gah, I miss playing with pointers and references High level languages like PHP and C# don't really allow the use of them.
hi vivek gupta in C & is address operator. any variable like x then &x is hold the address of variable x. so it use for store value of x . but in case of string, string is a character array so every character have one address like x[10] is a character array x[0],x[1]...hold one character so x not hold character it is use for hold address of first character(&x[0]) . so we use only variable name that hold address of first character.