Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

int main() { int x=10; printf("x=%d, count of earlier print=%d", x,printf("x=%d, y=%d",x,--x)); getch(); } ================================================== returns error>> ld returned 1 exit status =================================================== Does it have something to do with printf() inside another printf().

2 Answers  


int i,j; for(i=0;i<=10;i++) { j+=5; assert(i<5); }

3 Answers   Cisco, HCL,


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

2 Answers   IBM,


main() { int i=-1; -i; printf("i = %d, -i = %d \n",i,-i); }

1 Answers  


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

1 Answers  


write a program to count the number the same (letter/character foreg: 's') in a given sentence.

2 Answers  


How to count a sum, when the numbers are read from stdin and stored into a structure?

1 Answers  


C statement to copy a string without using loop and library function..

2 Answers   Persistent, TCS,


how can i search an element in an array

2 Answers   CTS, Microsoft, ViPrak,


main() { int i, j, *p; i = 25; j = 100; p = &i; // Address of i is assigned to pointer p printf("%f", i/(*p) ); // i is divided by pointer p } a. Runtime error. b. 1.00000 c. Compile error d. 0.00000

3 Answers   HCL,


main() { clrscr(); } clrscr();

2 Answers  


void main() { static int i; while(i<=10) (i>2)?i++:i--; printf(ā€œ%dā€, i); }

2 Answers  


Categories