1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <stdio.h> void test(char c) { printf("Got character %c\n", c); } void test(const char* c) { printf("Got string %s\n", c); } int main() { test('c'); test("c"); }
1 2
Got character c Got string c