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

What is the hidden bug with the following statement? assert(val++ != 0);

1 Answers  


Display the time of the system and display the right time of the other country

1 Answers  


void main() { int const * p=5; printf("%d",++(*p)); }

3 Answers   Infosys, Made Easy, State Bank Of India SBI,


Develop a routine to reflect an object about an arbitrarily selected plane

0 Answers  


Is there any difference between the two declarations, 1. int foo(int *arr[]) and 2. int foo(int *arr[2])

1 Answers  






What is the main difference between STRUCTURE and UNION?

13 Answers   HCL,


Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.

9 Answers   Microsoft,


x=2 y=3 z=2 x++ + y++; printf("%d%d" x,y);

2 Answers  


Write a program to print a square of size 5 by using the character S.

6 Answers   Microsoft,


what will be the position of the file marker? a: fseek(ptr,0,SEEK_SET); b: fseek(ptr,0,SEEK_CUR);

2 Answers  


write a c program to Create a mail account by taking the username, password, confirm password, secret_question, secret_answer and phone number. Allow users to register, login and reset password(based on secret question). Display the user accounts and their details .

2 Answers  


main() { int c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf(" %d ",*c); ++q; } for(j=0;j<5;j++){ printf(" %d ",*p); ++p; } }

1 Answers  


Categories