.main()
{
char *p = "hello world!";
p[0] = 'H';
printf("%s",p);
}


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Interview Questions

What is structure in c definition?

0 Answers  


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

1 Answers   IBM,


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); }

0 Answers   Wilco,


What is diffrance between declaration and defination of a variable or function

4 Answers  


I want tcs placement papers of 2004-2009 , its urgent

6 Answers   TCS, Wipro,






What is the use of typedef in structure in c?

0 Answers  


Write a program to print distinct words in an input along with their count in input in decreasing order of their count

0 Answers  


What are all different types of pointers in c?

0 Answers  


Where are c variables stored in memory?

0 Answers  


Write a program which returns the first non repetitive character in the string?

0 Answers   Expedia,


write a program which will count occurance of a day between two dates.

1 Answers   IonIdea,


What is wild pointer in c?

0 Answers  


Categories