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 / sharath kumar

#include <stdio.h>

int main(void)
{
if (printf("%c ", 59))
{
}
return 0;
}

Is This Answer Correct ?    0 Yes 0 No

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

Answer / ameya

Answer #1 and #2 are wrong. They dont work on Turbo C. If
anybody knows the write answer please email me the code.

Is This Answer Correct ?    8 Yes 9 No

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

Answer / lakshmi

void main()
{
if(getche()){}
}
you can input ; at run time and itll be printed on output
screen.

Is This Answer Correct ?    6 Yes 7 No

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

Answer / ceeemor

#include<iostream>

using namespace std;

int main() {

cout << char(59) << endl;

}

Is This Answer Correct ?    2 Yes 3 No

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

Answer / subash

include<stdio.h>
include<conio.h>
void main()
{
if(printf(";"))
{
}
}


Because If statements executes the result atleast once whether
the condition is wrong.....Try and tell..It is working..I worked

Is This Answer Correct ?    1 Yes 2 No

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

Answer / sorabh

#include<stdio.h>
#include<list>
#include<vector>

using namespace std;
char str[100002];
int dist[100002];
int n;

void BFS(int s)
{
vector<bool> visited(10,false);
list<int> queue;
dist[s] = 0;
queue.push_back(s);

while(!queue.empty())
{
s = queue.front();
queue.pop_front();

vector<int> temp; temp.clear();
if(s==0) temp.push_back(1);
else if(s==n-1) temp.push_back(n-2);
else { temp.push_back(s-1); temp.push_back(s+1);}
int sz=temp.size();
for(int i=0; i<sz; i++)
{
int node=temp[i];
if(1+dist[s]<dist[node]) {
dist[node] = 1+dist[s];
if(node==0) return;
queue.push_back(node);
}
}
if(!visited[str[s]-48]) {
sz=pos[str[s]-48].size();
for(int i=0; i<sz; i++)
{
int node=pos[str[s]-48][i];
if(1+dist[s]<dist[node]) {
dist[node] = 1+dist[s];
if(node==0) return;
queue.push_back(node);
}
}
visited[str[s]-48]=true;
}
}
}

int main()
{
scanf("%s",str);
n=strlen(str);
for(int i=0; i<n; i++) {
pos[str[i]-48].push_back(i);
dist[i] = INT_MAX;
}
BFS(n-1);
printf("%d",dist[0]);
return 0;
}

Is This Answer Correct ?    0 Yes 1 No

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

Answer / vivek

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

Is This Answer Correct ?    0 Yes 1 No

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

Answer / jatin

printf("use of semicolon is like this\;\n");

Is This Answer Correct ?    0 Yes 1 No

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

Answer / ravi

main()
{
if(printf(";"))
{
}
}

Is This Answer Correct ?    7 Yes 9 No

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

Answer / poorna

#include<stdio.h>
void main()
{
while( printf("%c", 59), 0)
{
}
}

Is This Answer Correct ?    2 Yes 5 No

Post New Answer

More C Code Interview Questions

#include<conio.h> main() { int x,y=2,z,a; if(x=y%2) z=2; a=2; printf("%d %d ",z,x); }

1 Answers  


How to return multiple values from a function?

7 Answers  


What is the problem with the following code segment? while ((fgets(receiving array,50,file_ptr)) != EOF) ;

1 Answers  


which function is used to clear the buffer stream on gcc? for example: I wrote following code on gcc #include<stdio.h> int main(void) { char ch; int a,b; printf("\nenter two numbers:\t"); scanf("%d%d",&a,&b); printf("enter number is %d and %d",a,b); printf("\nentercharacter:\t"); scanf("%c",&ch); printf("enter character is %c",ch); return 0; } in above progarm ch could not be scan. why?plz tell me solution.

2 Answers  


Ramesh’s basic salary is input through the keyboard. His dearness allowance is 40% of basic salary, and house rent allowance is 20% of basic salary. Write a program to calculate his gross salary.

1 Answers  






could you please send the program code for multiplying sparse matrix in c????

0 Answers  


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

0 Answers  


void main() { printf(“sizeof (void *) = %d \n“, sizeof( void *)); printf(“sizeof (int *) = %d \n”, sizeof(int *)); printf(“sizeof (double *) = %d \n”, sizeof(double *)); printf(“sizeof(struct unknown *) = %d \n”, sizeof(struct unknown *)); }

1 Answers  


Is it possible to print a name without using commas, double quotes,semi-colons?

7 Answers  


#if something == 0 int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }

1 Answers  


find A^B using Recursive function

2 Answers  


How can u say that a given point is in a triangle? 1. with the co-ordinates of the 3 vertices specified. 2. with only the co-ordinates of the top vertex given.

1 Answers  


Categories