.main()
{
char *p = "hello world!";
p[0] = 'H';
printf("%s",p);
}
No Answer is Posted For this Question
Be the First to Post Answer
What is structure in c definition?
what will the following program do? void main() { int i; char a[]="String"; char *p="New Sring"; char *Temp; Temp=a; a=malloc(strlen(p) + 1); strcpy(a,p); //Line no:9// p = malloc(strlen(Temp) + 1); strcpy(p,Temp); printf("(%s, %s)",a,p); free(p); free(a); } //Line no 15// a) Swap contents of p & a and print:(New string, string) b) Generate compilation error in line number 8 c) Generate compilation error in line number 5 d) Generate compilation error in line number 7 e) Generate compilation error in line number 1
main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }
What is diffrance between declaration and defination of a variable or function
I want tcs placement papers of 2004-2009 , its urgent
What is the use of typedef in structure in c?
Write a program to print distinct words in an input along with their count in input in decreasing order of their count
What are all different types of pointers in c?
Where are c variables stored in memory?
Write a program which returns the first non repetitive character in the string?
write a program which will count occurance of a day between two dates.
What is wild pointer in c?