s[i], *(i+s), *(s+i), i[s] are all different ways of expressing the same idea.Generally array name is the base address for that array. Here s is the base address. i is the index number/displacement from the base address. So, indirecting it with * is same as s[i]. i[s] may be surprising. But in the case of C it is same as s[i].
* is a dereference operator & is a reference operator. They can be applied any number of times provided it is meaningful. Here p points to the first character in the string "Hello". *p dereferences it and so its value is H. Again & references it to an address and * dereferences it to the value H
The valid escape codes in programming languages are ', ", \, n, or t are the valid escape codes.
For example, the sequence \n usually represents a newline, while the escape sequence \\ represents a backslash, \t usually represents a newtab.
Preprocessor executes as a seperate pass before the execution of the compiler. So textual replacement of clrscr() to 100 occurs.The input program to compiler looks like this :
main ()
{
100;
printf("%d\n",100);
}
Note: 100; is an executable statement but with no action. So it doesn't give any problem.
The coding or scrambling of data so that humans cannot read them is known as encryption.
main() { float a = 5.375 ; char *p; int i; p = ( char* ) &a ; for ( i = 0; i <= 3 ; i++ ) printf ( " %02x ", (unsigned char ) p[i] ); }
Copyright ©CuriousTab. All rights reserved.