Write a program to print a string without using any semicolon on the program:
#include<stdio.h>
main()
{
if(printf("Hello.."))
{
}
}
I want to know how this program can modified to print any string accepted through Keyboard..!!
If anyone know, feel free to comment it here..!! :):):)
#include<stdio.h>
main()
{
if(printf("Hello.."))
{
}
}
I want to know how this program can modified to print any string accepted through Keyboard..!!
If anyone know, feel free to comment it here..!! :):):)
6 comments :
#include
main()
{
if(char a[10]){}if(scanf("%s"),&a)){}if(printf("Hello.."))
{
}
}
will this work??
#include
#include
main(char a[10])
{
if(scanf("%s",a)){}if(printf("%s",a))
{
}
}
will this?
it will perform better in turbo c if the code was like this........
#include
#include
main()
{
if(printf("Hello.."))
{
}
if(getch())
{
}
}
for reading string through keyboard and displaying without using semicolon ,the code for turbo c++...is
------------------------------------------------------
#include
void main(char a[10])
{
if(printf("Enter string"))
{}
if(scanf("%s",a))
{}
if(printf("\n you enterd the string\n"))
{}
if(puts(a))
{}
if(getch())
{ }
}
@Anonymous
Nice work Sreenath :)
Thnx 4 d comment
#include
main(int argc, char *argv[])
{
if(printf("%s",argv[1]))
{
}
}
____________________________
./a.out
____________________________________
...............for passing command line arguments,
swamiji.
Post a Comment