multiple of 9 without useing +,* oprator
Answers were Sorted based on User's Feedback
Answer / guest
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{clrscr();
int a,i,r=0;
scanf("%d",&a);
for(i=a;i>0;i--)
r=r-9;
r=abs(r);
printf("%d",r);
getch();
}
| Is This Answer Correct ? | 4 Yes | 2 No |
Answer / tknowledge05
The above guest is me .. okkkkk....
by the time i solved and executing i was logged out and when i posted the answer it considered guest............
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / jeke kumar gochhayat
this program is for any no
#include<stdio.h>
void main()
{
int n,k,c,l,i;
printf("enter the no");
scanf("%d",&n);
printf("which no of multiple u want");
scanf("%d",&l);
k=n;c=n;
for(i=1;i<l;i++)
{
while((n--)>0)
k++;
n=c;
}
printf("the multiple=%d",k);
}
| Is This Answer Correct ? | 0 Yes | 0 No |
printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions
What are register variables in c?
what is the difference between <stdio.h> and "stdio.h"
14 Answers Invendis, Kanbay, Mastek, MathWorks,
HOW TO ANSWER IF ASKED " WHAT KIND OF A PERSON ARE YOU?" I NEED AN ANSWER THAT IMPRESS THE INTERVIEWER
difference between memcpy and strcpy
A function 'q' that accepts a pointer to a character as argument and returns a pointer to an array of integer can be declared as: A)int (*q(char*)) [] B)int *q(char*) [] C)int(*q)(char*) [] D)None of the Above
At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with these names could be kept in that shelf as in this example: bottom of shelf ---> [AAAJKRDFDEWAAYFYYKK]-----Top of shelf. All these packets are to be loaded on cars. The cars are lined in order, so that the packet could be loaded on them. The cars are also named [A, B, C, D, E,………….]. Each Car will load the packet with the same alphabet. So, for example, car ‘A’ will load all the packets with name ‘A’. Each particular car will come at the loading point only once. The cars will come at the loading point in alphabetical order. So, car ‘B’ will come and take all the packets with name ‘B’ from the shelf, then car ‘C’ will come. No matter how deep in the shelf any packet ‘B’ is, all of the ‘B’ packets will be displaced before the ‘C’ car arrives. For that purpose, some additional shelves are provided. The packets which are after the packet B, are kept in those shelves. Any one of these shelves contains only packets, having the same name. For example, if any particular shelf is used and if a packet with name X is in it, then only the packets having names X will be kept in it. That shelf will look like [XXXXXXX]. If any shelf is used once, then it could be used again only if it is vacant. Packets from the initial shelf could be unloaded from top only. Write a program that finds the minimum total number of shelves, including the initial one required for this loading process.
What are the advantages of using linked list for tree construction?
How is pointer initialized in c?
What is the difference between char a[] = "string"; and char *p = "string"; ?
14 Answers Adobe, Honeywell, TCS,
Write the following function in C. stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.
What is the use of getchar() function?