f(char *p)
{
p=(char *)malloc(sizeof(6));
strcpy(p,"HELLO");
}
main()
{
char *p="BYE";
f(p)
printf("%s",p);
}
what is the output?
Answer Posted / deepa
SOORY FOR POSTIN THE WRONG ANSWER THE ANSER WUD BE BYE COZ
THE *P DIES IN THE FUNCTION ITSELF AS WE ARE NOT RETURNING
THE STRING BACK IN THE MAIN PROGRAM
Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
Explain what is the difference between a string and an array?
Why use int main instead of void main?
What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25
What are different storage class specifiers in c?
Is c a great language, or what?
Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays
What is the maximum no. of arguments that can be given in a command line in C.?
The statement, int(*x[]) () what does in indicate?
how to capitalise first letter of each word in a given string?
7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.
in iso what are the common technological language?
What is structure in c language?
write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34
The program will first compute the tax you owe based on your income. User is prompted to enter income. Program will compute the total amount of tax owed based on the following: Income Tax 0 - $45,000 = 0.15 x income $45,001 - $90,000 = 6750 + 0.20 x (income – 45000) $90,001 - $140,000 = 15750 + 0.26 x (income – 90000) $140,001 - $200,000 = 28750 + 0.29 x (income – 140000) Greater than $200,000 = 46150 + 0.33 x (income – 200000) Dollar amounts should be in dollars and cents (float point numbers with two decimals shown). Tax is displayed on the screen.
What is the code for 3 questions and answer check in VisualBasic.Net?