Question:Write a program which prints " Testing C Skills" without no use of semicolon.
I have found one answer :
1. #include <stdio.h>
2. void main()
3.{
4. if(printf("Testing C Skills"))
5. {}
6.}
Question:Write a program which prints " Testing C Skills" without no use of semicolon.
I have found one answer :
1. #include <stdio.h>
2. void main()
3.{
4. if(printf("Testing C Skills"))
5. {}
6.}
I want to know is there any other answer?
I want to know when you'll use this knowledge anywhere except in a class taught by an idiot. Yes, there are other answers, but they follow the same concept. And your code is only correct with the condition that the compiler supports a void return from main. Otherwise it invokes undefined behavior.
Its possible for those keywords which doesn't require ';' in the end, now check in book and try it out.
@Naure, agree with you and never understood how such stupid questions really check someone's skill ??
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.