main()
{
char *p = "hello world";
p[0] = 'H';
printf("%s", p);
}
a. Runtime error.
b. “Hello world”
c. Compile error
d. “hello world”
Answer Posted / deepesh sharma
The Answer is
a) Runtime Error.
Details: hello world is a constant string and the address of
the memory location where this string is stored is assigned
to p. In second line you are changing the value at that
address which is constant string hence changing a constant
is runtime error.
Is This Answer Correct ? | 18 Yes | 7 No |
Post New Answer View All Answers
What is full form of PEPSI
What is the match merge ? compare data step match merge with proc sql merge - how many types are there ? data step vs proc sql
How do you verify if the two sentences/phrases input is an anagram using predefined functions in string.h and by using arrays?
Sir... please give some important coding questions asked by product companies..
Design an implement of the inputs functions for event mode
how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns
Write a Program in 'C' To Insert a Unique Number Only. (Hint: Just Like a Primary Key Numbers In Database.) Please Some One Suggest Me a Better Solution for This question ??
could you please send the program code for multiplying sparse matrix in c????
how to test pierrot divisor
What is the difference between proc means and proc tabulate ? explain with a simple example when you have to use means or tabulate?
Write a routine to implement the polymarker function
why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?
write a simple calculator c program to perform addition, subtraction, mul and div.
why nlogn is the lower limit of any sort algorithm?
create a C-code that will display the total fare of a passenger of a taxi if the driver press enter,the timer will stop. Every 10 counts is 2 pesos. Initial value is 25.00