Question
print a semicolon using Cprogram without using a semicolon
any where in the C code in ur program!!
Question Submitted By :: Solidcube
I also faced this Question!!
Rank
Answer Posted By
Re: print a semicolon using Cprogram without using a semicolon
any where in the C code in ur program!!
Answer
# 1
void main()
{
if(printf("semicolon")){}
if(printf(getch())){}
}
Vinay_csjm
Re: print a semicolon using Cprogram without using a semicolon
any where in the C code in ur program!!
Answer
# 2
void main()
{
while(!printf("\nHello World"))
}
Bikash Mazumdar
Re: print a semicolon using Cprogram without using a semicolon
any where in the C code in ur program!!
Answer
# 3
Answer #1 and #2 are wrong. They dont work on Turbo C. If
anybody knows the write answer please email me the code.
Ameya
Re: print a semicolon using Cprogram without using a semicolon
any where in the C code in ur program!!
Answer
# 4
#include<stdio.h>
void main()
{char a=';';
if(printf("%c",a)){}
}
Anshu Ranjan
Re: print a semicolon using Cprogram without using a semicolon
any where in the C code in ur program!!
Answer
# 5
#include<stdio.h>
void main()
{int a=59;
if(printf("%c",a)){}
}
\\the previous one was wrong
Anshu Ranjan
Re: print a semicolon using Cprogram without using a semicolon
any where in the C code in ur program!!
Answer
# 6
#include<stdio.h>
void main()
{
if(printf("%c",59)){}
}
\\actually, this is correct
Anshu Ranjan
Re: print a semicolon using Cprogram without using a semicolon
any where in the C code in ur program!!
Answer
# 7
Hey...thanx anshu....
Ameya
Re: print a semicolon using Cprogram without using a semicolon
any where in the C code in ur program!!
Answer
# 8
ultimate
Dkp
Re: print a semicolon using Cprogram without using a semicolon
any where in the C code in ur program!!
Answer
# 9
void main()
{
if(getche()){}
}
you can input ; at run time and itll be printed on output
screen.
Lakshmi
Re: print a semicolon using Cprogram without using a semicolon
any where in the C code in ur program!!
Answer
# 10
main()
{
if(printf("%c",59))
{}
}
Muthukumar
Re: print a semicolon using Cprogram without using a semicolon
any where in the C code in ur program!!
Answer
# 11
Anshus code is working,tanx
Bharadwaj
Re: print a semicolon using Cprogram without using a semicolon
any where in the C code in ur program!!
Answer
# 12
#include<stdio.h>
void main()
{
while( printf("%c", 59), 0)
{
}
}
Poorna
Re: print a semicolon using Cprogram without using a semicolon
any where in the C code in ur program!!
Answer
# 13
Does anyone know why its working??
("%c", 59)???
because 59 is the ascii value for a semicolon..
hence we are printing a character against a number..
This was juss as little information..
few may get confused.. :-)
Shruti
Re: print a semicolon using Cprogram without using a semicolon
any where in the C code in ur program!!
Answer
# 14
#include<stdio.h>
void main()
{
while( printf("%c", 59), 0)
{
}
}
Narasimha Peruru
Re: print a semicolon using Cprogram without using a semicolon
any where in the C code in ur program!!
Answer
# 15
int main()
{
if(hellow world){}
}
Rekha
Re: print a semicolon using Cprogram without using a semicolon
any where in the C code in ur program!!
Answer
# 16
main()
{
if(printf(";"))
{
}
}
Ravi
Re: print a semicolon using Cprogram without using a semicolon
any where in the C code in ur program!!
Answer
# 17
#include<iostream>
using namespace std;
int main() {
cout << char(59) << endl;
}
Ceeemor
Re: print a semicolon using Cprogram without using a semicolon
any where in the C code in ur program!!
Answer
# 18
#include<stdio.h>
void main()
{
if(printf("semicolon")){}
if(getch()){}
}
this will print the word 'semicolon'
Rakesh
Re: print a semicolon using Cprogram without using a semicolon
any where in the C code in ur program!!
Answer
# 19
#include<stdio.h>
#include<conio.h>
void main()
{
if(printf("%c",59)){}
if(getch()){}
}
this is the perfect solution...
Arunabha