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...

main()
{
char *ptr = "Ramco Systems";
(*ptr)++;
printf("%s\n",ptr);
ptr++;
printf("%s\n",ptr);
}
Find the Outputs?

Answer Posted / ruchi

Turbo c will give an answer
samco system
amco system
pointer ptr is at r
by(*ptr)++ we are incrementing it by one so we get s
by ptr ++ we are incrementing the addrestion of ptr so it
will give an output amco system;
but gcc compiler will not give any answer it will print
segmentation fault

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?

1074


What is I ++ in c programming?

1057


What are multidimensional arrays?

1058


What are the types of operators in c?

999


How can I write functions that take a variable number of arguments?

1075


What is function pointer c?

1026


When c language was developed?

1006


In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?

1168


Explain the binary height balanced tree?

1121


How does pointer work in c?

1070


What is the right type to use for boolean values in c?

987


What is the difference between int main and void main?

993


In C programming, what command or code can be used to determine if a number of odd or even?

987


Why we use break in c?

932


What is the value of a[3] if integer a[] = {5,4,3,2,1}?

1027