WAP to find that given no is small or capital

Answers were Sorted based on User's Feedback



WAP to find that given no is small or capital..

Answer / pinky

main()
{
char ch;
scanf("%c",&ch);
if(ch>64&&ch<91)
printf("capital");
else
printf("small");
}
in scanf fn. it must be '%c' otherwise the ans wl be 'small'
always (check it)

Is This Answer Correct ?    1 Yes 0 No

WAP to find that given no is small or capital..

Answer / naresh.s

main()
{
char ch;
scanf("%d",&ch);
if(ch>64&&ch<91)
printf("capital");
else
printf("small");
}

Is This Answer Correct ?    2 Yes 2 No

WAP to find that given no is small or capital..

Answer / mukesh

how a number could be small or CAPITAL

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What are data types in c language?

0 Answers  


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

0 Answers   HCL,


Explain following declaration int *P(void); and int (*p)(char *a);

3 Answers  


Is it possible to create recycle bin in mobiles?

2 Answers  


A set of N billiard balls are set on a one-dimensional table. The table is 1 meter long, set north-south with two pockets at either side. Each ball has zero width and there is no friction so it is moving with a fixed velocity of either northward or southward and bounces back in a perfect elastic collision from other balls it encounter on its way (or drop into one of the pockets). Your job is to keep track of the balls movements. Task Please write a program that gets the initial place, speed and direction of all the balls and gives the position of a specific ball after t seconds. Input The first line contains the number of scenarios. Each one of the other lines in the input contains a scenario: The first number, N, is the number of balls; followed by N pairs of numbers: the distance in centimeters from the south end of the table and the speed (positive speed meaning it moves northward); the last two numbers are the number i of the target ball you should track and the time T in seconds. Output The output is a single number for each line which is the place (distance in centimeters from the south end of the table) of the tracked ball after T seconds. Note: There is no new line character at the end of the result. Sample Input 5 1 50 1 1 1000 1 50 1 1 6 1 60 -2 1 6 2 10 1 95 -1 2 30 2 10 1 95 -1 2 60 Sample Output 100 56 48 65 70

0 Answers  






#include<stdio.h> main() { int i=5; printf("%d",i*i-- - --i*i*i++ + ++i); } tell the answer with correct reason .specially reason is important nt answer ans by turbo c is -39

1 Answers   GameLoft,


18)struct base {int a,b; base(); int virtual function1(); } struct derv1:base{ int b,c,d; derv1() int virtual function1(); } struct derv2 : base {int a,e; } base::base() { a=2;b=3; } derv1::derv1(){ b=5; c=10;d=11;} base::function1() {return(100); } derv1::function1() { return(200); } main() base ba; derv1 d1,d2; printf("%d %d",d1.a,d1.b) o/p is a)a=2;b=3; b)a=3; b=2; c)a=5; b=10; d)none 19) for the above program answer the following q's main() base da; derv1 d1; derv2 d2; printf("%d %d %d",da.function1(),d1.function1(),d2.function1 ()); o/p is a)100,200,200; b)200,100,200; c)200,200,100; d)none 20)struct { int x; int y; }abc; you can not access x by the following 1)abc-->x; 2)abc[0]-->x; abc.x; (abc)-->x; a)1,2,3 b)2&3 c)1&2 d)1,3,4

1 Answers  


DIFFERNCE BETWEEN THE C++ AND C LANGUAGE?

2 Answers   Wipro,


What is the 'named constructor idiom'?

0 Answers  


What is c method?

0 Answers  


What is scope and lifetime of a variable in c?

0 Answers  


plz answer..... a program that reads non-negative integer and computes and prints its factorial

2 Answers  


Categories