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

main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }

1 Answers  


can you use proc sql to manpulate a data set or would u prefer to use proc report ? if so why ? make up an example and explain in detail

0 Answers   TCS,


Is the following statement a declaration/definition. Find what does it mean? int (*x)[10];

1 Answers  


There are 21 people in a room. They have to form groups of 3 people each. How many combinations are possible? Write a C program to print the same.

1 Answers   TCS,


Is the following code legal? struct a { int x; struct a *b; }

2 Answers  






what is brs test reply me email me kashifabbas514@gmail.com

0 Answers  


main() { int i; clrscr(); for(i=0;i<5;i++) { printf("%d\n", 1L << i); } } a. 5, 4, 3, 2, 1 b. 0, 1, 2, 3, 4 c. 0, 1, 2, 4, 8 d. 1, 2, 4, 8, 16

4 Answers   HCL,


Write a program to receive an integer and find it's octal equivalent. How can i do with using while loop.

2 Answers  


why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?

0 Answers  


What is data _null_? ,Explain with code when u need to use it in data step programming ?

0 Answers   Abbott,


Question: We would like to design and implement a programming solution to the reader-writer problem using semaphores in C language under UNIX. We assume that we have three readers and two writers processes that would run concurrently. A writer is to update (write) into one memory location (let’s say a variable of type integer named temp initialized to 0). In the other hand, a reader is to read the content of temp and display its content on the screen in a formatted output. One writer can access the shared data exclusively without the presence of other writer or any reader, whereas, a reader may access the shared memory for reading with the presence of other readers (but not writers).

1 Answers  


void main() { unsigned giveit=-1; int gotit; printf("%u ",++giveit); printf("%u \n",gotit=--giveit); }

1 Answers  


Categories