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
What is the use of ?
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?
What are linked lists in c?
Explain logical errors? Compare with syntax errors.
Do variables need to be initialized?
How can I pad a string to a known length?
Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"
What is "Hungarian Notation"?
What are types of functions?
What is function prototype in c language?
An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?
What does the function toupper() do?
What is the use of structure padding in c?
Explain modulus operator. What are the restrictions of a modulus operator?