No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Re:
[I]Interesting tricky program using C & C++: [/I] [B]Program 1:[/B] Create a Program which produce output "Hello World" , the program must not contains semicolon ; in other word any statement of the program will not have a termination semicolon. [B]Program 2:[/B] Write a C or C++ program which run … |
|
Re:
Write a C program to Remove even numbers and fill it with zeros. Note: You can use only one loop for your logic. Two variables apart from the array. Input array 1,2,3,4,5,6 Output 1,3,5,0,0,0 |
|
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:
How this calculation is done i'am confused i am getting an answer 14 ?? #include<iostream> #include<conio.h> using namespace std;main() { int a=5; int d; d=++a + ++a; cout<<d; getch(); } |