Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

15.what is the disadvantage of using macros?
16.what is the self-referential structure?
17.can a union be self-referenced?
18.What is a pointer?
19.What is the Lvalue and Rvalue?
20.what is the difference between these initializations?
21.Char a[]=”string”;
22.Char *p=”literal”;
23.Does *p++ increment p, or what it points to?

Answer Posted / abdur rab

The difference between
21...in char a[]="string";
22... in char *p="literal";

is

in char a[]="string";, the memory is allocated, so the
value can be changed, it can be incremented, etc.

where as in char *p="literal";, you can just read it, may
be you can increment the pointer to point to the next
location, the content cannot be changed since this is a
string literal or BSS (Block Started by Symbol). This is
often called "const_data" or "data_const", or "literal".

23. *p++ it gets the content, and then increments the
pointer to the next location.

eg:

char a[] = {"string"};
char x;
char* p = (char*) a;

x = *p++;

printf ( "%c\n, %s\n", x, p );

output
======
s
tring

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of clrscr?

1104


In a switch statement, what will happen if a break statement is omitted?

1059


Explain what is the difference between a free-standing and a hosted environment?

1184


How does pointer work in c?

1124


Describe dynamic data structure in c programming language?

1096


What is the use of getchar() function?

1129


Why do we need functions in c?

1020


What are the 5 types of inheritance in c ++?

1023


Explain what are the different file extensions involved when programming in c?

1110


Ow can I insert or delete a line (or record) in the middle of a file?

1004


A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none

1247


What is s or c?

1064


On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area

1117


What is the difference between strcpy() and memcpy() function in c programming?

1086


shorting algorithmS

2255