what is the code for getting the output as
*
**
***
Answers were Sorted based on User's Feedback
Answer / gg
#include<stdio.h>
main()
{
int n,i=0,j=0;
printf("Enter an intger : ");//upto n nof *'s
scanf("%d",&n);
while(j<n)
{
for(i=0;i<=j;printf("*"),i++);
printf("\n",j++);
}
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / sourisengupta
void main()
{
int i,j;
for(i=0;i<3;i++){
for(j=0;j<i;j++){
printf("*");
printf("\n");
}
}
}
| Is This Answer Correct ? | 1 Yes | 4 No |
Answer / pooja sonawane
void main()
{
int i,j;
for(i=0;i<3;i++)
printf("\n");
for(j=0;j<i;j++)
printf("*");
}
| Is This Answer Correct ? | 2 Yes | 6 No |
what is pointer?
What is the explanation for modular programming?
Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?
#include<stdio.h> int f(int,int); int main() { printf("%d",f(20,1)); return 0; } int f(int n,int k) { if(n==0) return 0; else if(n%2)return f(n/2,2*k)+k; else return f(n/2,2*k)-k; } how this program is working and generating output as 9....?
Explain union. What are its advantages?
what is the difference between strcpy() and memcpy() function?
write a programme to enter some number and find which number is maximum and which number is minimum from enterd numbers.
What are function pointers? Provide an example.
what will be the output: main(){char ch;int a=10;printf("%d",ch);}
36 Answers Accenture, TCS, Wipro,
wt is d full form of c
please give me some tips for the placement in the TCS.
C passes By value or By reference?
5 Answers Geometric Software, Infosys,