πŸ“Š C Programming
Q. What will be the output of the following code snippet?
Code:
#include <stdio.h>
#include<string.h>
void solve() {
    char s[] = "Hello";
    printf("%s ", s);
    char t[40];
    strcpy(t, s);
    printf("%s", t);
}
int main() {
    solve();
	return 0;
}
  • (A) Hello Hello
  • (B) Hello
  • (C) Compilation Error
  • (D) None of the above.
πŸ’¬ Discuss
βœ… Correct Answer: (A) Hello Hello

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
192
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Manisha Agrawal
Publisher
πŸ“ˆ
83%
Success Rate