wap to print "hello world" without using the main function.
Answer Posted / andy
Ranjan's answer was the correct one. And it's what interviewers expect.
use g++ to compile and run this:
#include<stdio.h>
#include<iostream>
class World
{
public:
World()
{
printf("Hello world\n");
}
};
World w1;
int main()
{
printf("Hello world again!!\n");
return 0;
}
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
write a C program: To search a file any word which starts with ?a?. If the word following this ?a? starts with a vowel.Then replace this ?a? with ?a? with ?an?. redirect with the output onto an output file.The source file and destination file are specified by the user int the command line.
What are different types of operators?
What is the difference between text and binary modes?
Is there sort function in c?
What is size of union in c?
What is formal argument?
Explain how can I remove the trailing spaces from a string?
Explain the difference between ++u and u++?
Explain a file operation in C with an example.
Is there any possibility to create customized header file with c programming language?
Why array is used in c?
Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me
Explain the binary height balanced tree?
What are control structures? What are the different types?
How can you find the exact size of a data type in c?