No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
- Interests
- C, Android apps development
4 Posted Topics
Re: #include<stdio.h> void main() { int i,j,k=0,n=8100; char s[100],t[100]; clrscr(); k=n&1; if(k==1) printf("%d is odd number",n); else printf("%d is even no",n); getch(); } | |
Re: #include<stdio.h> void main() { int i,j,k,n,m,a[100][100]; clrscr(); printf("Enter no of rows and columns\n"); scanf("%d%d",&n,&m); for(i=0;i<n;i++) { for(j=0;j<m;j++) { scanf("%d",&a[i][j]); } } printf("the orginal matrix is\n"); for(i=0;i<n;i++) { for(j=0;j<m;j++) { printf("%d ",a[i][j]); } printf("\n"); } printf("\nThe lower triangular matrix is\n"); for(i=0;i<n;i++) { for(j=0;j<m;j++) { if(i>=j) printf("%d ",a[i][j]); else printf(" "); } … | |
C program to remove even numbers and fill it with zero Input array 1,2,3,4,5,6 Output 1,3,5,0,0,0 #include<stdio.h> void main() int i,j,k,n=6,a[]={1,2,3,4,5,6}; clrscr(); for(i=0;i<n;i++) { if(a[i]%2==0) { a[i]=-1; } else printf("%d",a[i]); } for(i=0;i<n;i++) { if(a[i]==-1) printf("0"); } getch(); } | |
Re: actually first ++a is incrementing two times and during first increment it is asigned to 6 during second 7 and now the values is 7 for both a therefore the op is 7+7 |
The End.