print a semicolon using Cprogram without using a semicolon
any where in the C code in ur program!!

Answers were Sorted based on User's Feedback



print a semicolon using Cprogram without using a semicolon any where in the C code in ur program!!..

Answer / anshu ranjan

#include<stdio.h>
void main()
{
if(printf("%c",59)){}
}
\\actually, this is correct

Is This Answer Correct ?    104 Yes 3 No

print a semicolon using Cprogram without using a semicolon any where in the C code in ur program!!..

Answer / vinay_csjm

void main()
{
if(printf("semicolon")){}
if(printf(getch())){}
}

Is This Answer Correct ?    72 Yes 35 No

print a semicolon using Cprogram without using a semicolon any where in the C code in ur program!!..

Answer / muthukumar

main()
{
if(printf("%c",59))
{}
}

Is This Answer Correct ?    23 Yes 4 No

print a semicolon using Cprogram without using a semicolon any where in the C code in ur program!!..

Answer / shruti

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.. :-)

Is This Answer Correct ?    11 Yes 2 No

print a semicolon using Cprogram without using a semicolon any where in the C code in ur program!!..

Answer / ameya

Hey...thanx anshu....

Is This Answer Correct ?    6 Yes 2 No

print a semicolon using Cprogram without using a semicolon any where in the C code in ur program!!..

Answer / ankit popli

Answer#2 has a mistake thats why its not working in TURBO C/C++.....i.e

void main()
{
while(!printf("\nHello World"))
{}
}

Is This Answer Correct ?    3 Yes 0 No

print a semicolon using Cprogram without using a semicolon any where in the C code in ur program!!..

Answer / bharadwaj

Anshus code is working,tanx

Is This Answer Correct ?    4 Yes 2 No

print a semicolon using Cprogram without using a semicolon any where in the C code in ur program!!..

Answer / arun chauhan

#include<stdio.h>
void main()
{
if(printf("semicolon"))
{}
}

when you compile and run the program it will not stop at the console. You can see the result with the help of Alt+F5

Is This Answer Correct ?    2 Yes 0 No

print a semicolon using Cprogram without using a semicolon any where in the C code in ur program!!..

Answer / dkp

ultimate

Is This Answer Correct ?    4 Yes 3 No

print a semicolon using Cprogram without using a semicolon any where in the C code in ur program!!..

Answer / rakesh

#include<stdio.h>
void main()
{
if(printf("semicolon")){}
if(getch()){}
}
this will print the word 'semicolon'

Is This Answer Correct ?    3 Yes 2 No

Post New Answer

More C Code Interview Questions

main(){ char a[100]; a[0]='a';a[1]]='b';a[2]='c';a[4]='d'; abc(a); } abc(char a[]){ a++; printf("%c",*a); a++; printf("%c",*a); }

2 Answers  


main() { int i=0; while(+(+i--)!=0) i-=i++; printf("%d",i); }

9 Answers   CSC, GoDB Tech, IBM,


Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped

1 Answers   IBM,


What are segment and offset addresses?

2 Answers   Infosys,


#include<stdio.h> main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s; printf("%d",s->x); printf("%s",s->name); }

3 Answers   Hexaware,






Code for 1>"ascii to string" 2>"string to ascii"

1 Answers   Aricent, Global Logic,


How can you relate the function with the structure? Explain with an appropriate example.

0 Answers  


main() { int i; printf("%d",scanf("%d",&i)); // value 10 is given as input here }

2 Answers   IBM,


To reverse an entire text file into another text file.... get d file names in cmd line

0 Answers   Subex,


/*what is the output for*/ void main() { int r; printf("Naveen"); r=printf(); getch(); }

4 Answers  


Write a program that produces these three columns sequence nos. using loop statement Sequence nos. Squared Squared + 5 1 1 6 2 4 9 3 9 14 4 16 21 5 25 30

1 Answers   GoDB,


main() { unsigned char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

1 Answers  


Categories