f(*p)
{
p=(char *)malloc(6);
p="hello";
return;
}
main()
{
char *p="bye";
f(p);
printf("%s",p);
}
what is the o/p?
Answer Posted / vrushali
The answer is bye...
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
Which is better pointer or array?
Explain how do you determine a file’s attributes?
What happens if a header file is included twice?
What is substring in c?
about c language
#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }
What are the complete rules for header file searching?
Difference between Shallow copy and Deep copy?
In cryptography, you could often break the algorithm if you know what was the original (plain) text that was encoded into the current ciphertext. This is called the plain text attack. In this simple problem, we illustrate the plain text attack on a simple substitution cipher encryption, where you know each letter has been substituted with a different letter from the alphabet but you don’t know what that letter is. You are given the cipherText as the input string to the function getwordSets(). You know that a plain text "AMMUNITION" occurs somewhere in this cipher text. Now, you have to find out which sets of characters corresponds to the encrypted form of the "AMMUNITION". You can assume that the encryption follows simple substitution only. [Hint: You could use the pattern in the "AMMUNITION" like MM occurring twice together to identify this]
What is the difference between scanf and fscanf?
Explain what are preprocessor directives?
What is header file in c?
What is memcpy() function?
Explain how do you override a defined macro?
What is the difference between c &c++?