Skip to content

Conversation

@Stackmemory0x00
Copy link

@Stackmemory0x00 Stackmemory0x00 commented May 19, 2024

Hello, world! is a character array rather a char. This distiguish is very important specially for beginners and those coming from other languages like JS where single and double quote is same thing.

I have also updated the code for printf because as a beginner , I think its very important to think of good and efficient code from the get go. Instead of calling the funciton 3 times , its better to call it one time , pass all arugments in one go.

I also added return statement. I have spent many hours as a beginner debugging functions I wrote to find out that I did not include a return statement for the value I have calculated in my function :)

Hello, world! is a character array rather a char.
It's better(I think) to call printf function one time, pass all arguments in one go rather than calling it 3 times.

The output will be the same but as a beginner(like me) , its very important always to think of efficent and fast code exeuction from the get go.
update No of arguments condition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant