Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following C code?
#include < stdio.h >
void main()
{
char *str = “”;
do
{
printf(“hello”);
} while (str);
}

What will be the output of the following C code?
#include < stdio.h >
void main()
{
char *str = “”;
do
{
printf(“hello”);
} while (str);
}
a) Nothing
b) Run time error
c) Varies
d) Hello is printed infinite times

Answer: d

Join The Discussion