| Important : Please do NOT wait for job alert emails. Sometimes, we may NOT be able to send emails due to server problems. So always directly visit www.ChetanaSforum.com to view all jobs DAILY, so that you will NOT miss important Walk-In. We suggest you to LIKE OUR FACEBOOK PAGE to keep track of new jobs through Facebook. |
Home Register Facebook Post Jobs for Free Jobs By Location Exclusive Off-Campus 2013 Batch Job Fairs JavaKen.com TestingKen.com
| Infosys, TCS, Yahoo & Amazon are hiring. Register Now ! | Submit Resume to 50,000 Recruiters | LIKE our FaceBook Page |
![]() ![]() |
Feb 5 2011, 02:54 PM
Post
#1
|
||||||
|
Newbie ![]() Group: Members Posts: 3 Joined: 30-January 11 Member No.: 539,229 |
difference b/w char*x and char x[]
|
|||||
|
|
||||||
Feb 5 2011, 04:33 PM
Post
#2
|
|
|
Newbie ![]() Group: Members Posts: 1 Joined: 30-July 10 Member No.: 384,216 |
difference b/w char*x and char x[] In char*x, the variable x is a pointer of character type(a pointer is variable which points(represent) to some memory location) in char x[] the x is a array of character type (like string). |
|
|
|
Feb 7 2011, 09:45 AM
Post
#3
|
|
|
Advanced Member ![]() ![]() ![]() Group: Members Posts: 241 Joined: 1-November 08 Member No.: 201,082 |
I hope this source will help you
http://bytes.com/topic/c/answers/127619-di...een-char-char-x -------------------- |
|
|
|
Feb 28 2011, 03:09 PM
Post
#4
|
|
|
Advanced Member ![]() ![]() ![]() Group: Members Posts: 45 Joined: 3-November 10 Member No.: 463,857 |
-------------------- |
|
|
|
Feb 28 2011, 03:09 PM
Post
#5
|
|
|
Advanced Member ![]() ![]() ![]() Group: Members Posts: 45 Joined: 3-November 10 Member No.: 463,857 |
-------------------- |
|
|
|
Aug 19 2011, 06:13 PM
Post
#6
|
|
|
Newbie ![]() Group: Members Posts: 2 Joined: 15-August 11 Member No.: 742,470 |
difference b/w char*x and char x[] In char * x is the pointer pointing to the intial memory location and size of the pointer is not fix. but in char x[] we have to initialize the array of fix size. |
|
|
|
Dec 1 2011, 12:52 PM
Post
#7
|
|
|
Member ![]() ![]() Group: Members Posts: 11 Joined: 30-December 10 From: Jaipur Member No.: 510,009 |
The difference here is that
char *x puts in the read-only parts of the memory and making x a pointer to that, making any writing operation on this memory illegal. While doing: char x[] puts in read-only memory and copies to newly allocated memory on the stack. _____________ SEO Swindon |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 18th May 2013 - 02:49 PM |