Program9
CodeChefOpen on judge ↗
#include #include #include const char * make_a_copy(const char *st) { char *copy_st; copy_st=malloc(strlen(st)); strcpy(copy_st,st); return copy_st; } int main() { const char *str1=’A'; const char *str2=make_a_copy(str1); printf("%s\n",str2); return 0; } Expected Output : A Rules: 1) Changes can only be made in main() function 2) U can delete at most four characters
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start