why pointers are important in c language?
369068
Pointers are variables that only point to memory locations instead of variables that contain the information itself.  Other languages use pointers to point to complex data types such as a data structure, but C allows much more robust pointers.  A pointer will use a lot less memory to point to a memory location that having to use the memory itself every time.
52818
Wow, 17 years of C programming, and I didn't know that one.  I did some looking and according to the man page on scanf:\n\n[ Matches a nonempty sequence of characters from  the\n  specified  set  of  accepted  characters;  the next\n  pointer must be a pointer to char, and  there  must\n  be  enough  room  for  all  the  characters  in the\n  string, plus  a  terminating  NUL  character.   The\n  usual  skip  of  leading white space is suppressed.\n  The string is to be made up of  characters  in  (or\n  not in) a particular set; the set is defined by the\n  characters between the open bracket [ character and\n  a  close  bracket  ]  character.   The set excludes\n  those characters if the first character  after  the\n  open bracket is a circumflex ^.  To include a close\n  bracket in the set, make  it  the  first  character\n  after the open bracket or the circumflex; any other\n  position will end the set.  The hyphen character  -\n  is  also  special;  when  placed  between two other\n  characters, it adds all intervening  characters  to\n  the  set.   To  include  a hyphen, make it the last\n  character before  the  final  close  bracket.   For\n  instance,  `[^]0-9-]'  means  the  set  `everything\n  except  close  bracket,  zero  through  nine,   and\n  hyphen'.   The string ends with the appearance of a\n  character not in the (or, with  a  circumflex,  in)\n  set or when the field width runs out.\n\nSo, I interpret this as read everything up until the terminating newline.  Since the man page says the next argument must be a character pointer, the entire sequence is read as a string.\n\nFor what it's worth, I don't use scanf.  I use gets or fgets, and if I really need scanf, I then use sscanf on what was read by gets or fgets.
446677
I think you might be asking about the main statement.  This takes the form\n\nvoid main (void)\n{\n}\n\n(ok, sometimes other forms such as int main(int, char*){})\n\nIt is normally used to signify the entry point for an execution unit.\n\nBut, knowing this won't help you much.  There are hundreds of books on the subject, but you should start with K&R.  You won't learn C from Yahoo answers.
1018747
You can store as many characters in an C array as you want.\n\nAlso I suggest you change to djgpp if you something similar to turbo c++. TUrbo C++ 3 is more or less dead and was ment for DOS only. Other alternates are VC 6, GCC on Linux, GCC using cygwin on windows.\n\nThere are some errors in the code you posted along with your question.\n\nIt should be \n\nchar input[1000];\ngets(input);\n\nand not gets(&input)\nSame is the case with scanf\n\nSince the name of an arrey itself is a pointer you need not send address of pointer.
235388
C was originally developed as a cross platform language just prior to the innovation of object oriented programming. C used libraries of machine code for basic operations (procedures). If you had the source code and the proper library modules you could compile that code to run on virtually any machine. C was the precursor to object oriented programming and the object oriented windows operating system. C was rewritten as a purely object oriented language called C+ then C++ then C#. Before dos there was cp/m, unix and apple. Programs written for one operating system could not be compiled by another. C is responsible for the evolution of modern computers.
978917
Because C++ allows the creation of objects (Classes).\n\nRead more here\nhttp://www.research.att.com/~bs/homepage.html\n///
530460
in c, it is not needed to return anything. So you can call a void main.\nIn c++, you need to return an int from main. The convention is to return 1 for suceess and 0 for a failure.\nC today also supports an int main()
551498
I'm no "C" expert, but in Delphi this is a Windows system call, and I'm sure it will be a similar implementation in C; just alter the syntax as necessary...
293579
There is no functional difference.  Its all just preference.  Some people like to designate that a pointer is being used beside the data type, and others prefer to signify a point beside the variable name.  Placement of "const" shouldn't matter either.\n\nNotice that there is no functional difference in the outputs:\n\n#include <iostream>\n\nusing namespace std;\n\nint main(){\n    char d='a';\n    const char* c=&d;\n    char const *b=&d;\n    \n    cout<<c<<endl;\n    cout<<b<<endl;\n    \n    //Require for Dev-C++\n    //system("pause");\n    \n    return 0;\n}
523986
No, you do not need to know C to learn C++.  C is a lower- level language.  This means that it requires you to know low level machine details such as memory management for strings, arrays, and dynamic memory allocation.  C++ came later, and addresses many of the frustrations C programmers had by replacing character arrays with the string class and arrays with the vector class, for example.
736284
change the memory module to huge while compile ur code. try simple codes like\n\nint main()\n{\nint *p;\np = (int *) malloc (sizeof(int));\nscanf("%d", &p);\nprintf("%d",*p);\n}\n\nu can find differ, i think...
935645
main() { static char *a="n0body"; char b[512],*c,*d;\n  while (c=gets(a)) for (d=a;c;*c^=*d,c++,d=*++d?d:a);\n  printf ("%s&#92;n",b);}\n\n\nhappy?
775271
if this is a .c file, then the reason is that you have declared local variables AFTER a function call.  This is legal in c++ but not in c.\n\nswap the printf and char lines and it should work.
639857
use of this pointer is to show the current referemce.\nu can pass the formal arguments and variables with same name,\n\nfor eg a part of prog\n.\n.\nvoid initialize(int x,int y)\n{\nthis.x=x;//x=5\nthis.y=y;//y=6\n}\n.\nvoid main()\n{\n..\n...\ninitialize(5,6);\n}\nif this is not used the above prog will be\n\nvoid initialize(int x,int y)\n{\nx1=x;//x1=5\ny1=y;//y1=6\n}\n.\nvoid main()\n{\n..\n...\ninitialize(5,6);\n}\n\ndid u understand..
299395
There can be many a reasons for it\n\n1) You are trying to call up an Interrupt Request\n2) You are trying to access hardware directly.\n3) You are trying to write to a memory location that is prohibited.\n4) You may be missing some required library file.\n5) You may be throwing an unhandled system exception/error.\n\nHere you refers to your program or the native code compiler. For you have not mentioned as where exactly does the problem occur, while executing or while compiling the code.
116319
In C, "void" has three distinct uses.\n\n1) Return values for functions. If a function returns literally NOTHING, then it is declared as returning void. This tells the compiler not to push/pop any return value on/off the stack on return. It also tells the compiler that the result of the function cannot be assigned or compared to any variable.\n\n2) Generic pointers. When you are dealing with generic pointers, such as returns from "malloc", parameters to "free", "memcpy" and such, these functions need pointers, but they really don't care what data type the pointers actually point to. Rather than declaring a copy of these functions that returns every possible atomic type (char, short, int, long, float, double and such), they simply use a pointer to type void (void*) instead.\n\n3) Ignoring return values. If you are using a particularly picky compiler, or even a program such as Lint that produces warnings when you ignore the return value of a function that returns something other than void, you can cast the function call to type void to make the warning go away if you really don't need to know the return value.\n\nFor instance, "printf" returns an "int" value. So if you use the following line in your program:\n\nprintf ("Hello world");\n\nit could actually generate a warning, since you ignore the return value. If instead you use the line\n\n(void) printf ("Hello world");\n\nyou are telling the compiler that you are purposefully ignoring the return value, so it will not issue a warning in this case. This is of particular use if you have a policy of zero warnings (as all programmers should).\n\n"Void" kind of lives in limbo just outside of datatypes - it is not a modifier such as "static", "const" or "volatile", but it is not possible to declare a variable of type "void". It is kind of in its own little world there.
740430
You are you using a a pointer and an array while passing a variable to a function called Point. I'm not quite sure what you are trying to point to, but you are copying the heap.