My Online Exams
My Programs
My Favourites
Scrap Book
Edit Profile
Profile Log
Profile Picture
Email Alert
Security Settings
Signature
My Resource
Logout
Programs
Experts
Community
Question
Online Exam
Resource
Link Gallery
Members
Search
Login
Username:
Password:
New user? Sign up
Forgot Password?
Notice
New Category Started
Question, Resource &
Rich Text Editor
for content text input
Invite Friends
Email
*
Firstname
*
Lastname
Question by CodeZero
CodeZero
int *p=10;
or
float *f=1.5;
why do these two statements throw an error on compilation??
but when we write:
char *c="ABC";
there is no error.
31st Dec 09 08:45:57 AM
Answers by other users
Joydeep
int*, char* or float* is suppose to hold a memory address, here 10 or 1.5 is not an address....
but how char* c = "ABC" works ...
for a character array it automatically sends the base address of the string, for any char array when ever u initalize it or store anything what gets stored internally is the base address of the array
8th Jan 10 03:54:39 PM
Post Asnwer
Tips:
Please don't post a answer which is already their for the question.
You can post puzzle related question along with programming questions.
© Scodz, 2006 All Rights Reserved.
Guest Book
|
FAQ
|
Privacy Policy
|
Terms & Conditions
|
Contact Us