what is the code for getting the output as
*
**
***
Answer Posted / anvesh
main()
{
printf("*\n**\n***);
}
OR
main()
{
int n,i;
while(n<3)
{
i=0;
while(i<=n)
{printf("*");i++;}
printf("\n); n++;
}
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?
Write a Program to accept different goods with the number, price and date of purchase and display them
Describe the difference between = and == symbols in c programming?
What is a example of a variable?
What would be an example of a structure analogous to structure c?
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]
how do you execute a c program in unix.
What is null in c?
How can you read a directory in a C program?
In cryptography, you could often break the algorithm if you know what was the original (plain) text that was encoded into the current ciphertext. This is called the plain text attack. In this simple problem, we illustrate the plain text attack on a simple substitution cipher encryption, where you know each letter has been substituted with a different letter from the alphabet but you don’t know what that letter is. You are given the cipherText as the input string to the function getwordSets(). You know that a plain text "AMMUNITION" occurs somewhere in this cipher text. Now, you have to find out which sets of characters corresponds to the encrypted form of the "AMMUNITION". You can assume that the encryption follows simple substitution only. [Hint: You could use the pattern in the "AMMUNITION" like MM occurring twice together to identify this]
How will you divide two numbers in a MACRO?
What is wrong with this initialization?
What is pragma c?
What is the purpose of sprintf() function?
What are the types of arrays in c?