- Strength to Increase Rep
- +5
- Strength to Decrease Rep
- -1
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 3
- Posts with Downvotes
- 1
- Downvoting Members
- 3
- Interests
- Reading ,C++ loop patterns
Re: Dear Indrapriya, Please mark the problem as solved. | |
Re: Explain a little more about your problem. Post your effort. Its then you will get help. | |
Re: Is your file location correct? - "/etc/rc.d/rc.local" | |
Re: You should try out functions specified in <graphics.h> for creating your assignment. Scan through the functions specified in them . I use Turbo C for compiling my programs. You can use other IDEs like Dev C++ because its considered obsolete but not yet for me! | |
Re: May be this could fix your problem , run it . I tried it worked, I cant figure out any other alternate way to it in C [code=c] #include<graphics.h> #include<conio.h> #include<stdio.h> int main() { int ip; int gd=DETECT,gm; initgraph(&gd,&gm," "); cscanf("%d",&ip); getch(); printf("Input Output \n"); printf("%d %d",ip , ip); getch(); … | |
Please help me find the sine series . My program is: [code] #include<stdio.h> #include<conio.h> #include<math.h> float facto(int a); int main() { int n,g,k,y; y=1; float s=0.0; float f=0.0; float l =0.0; float x; int t=0; printf(" limit is \n"); scanf("%d",&n); printf(" no. is \n"); scanf("%d",&x); x=3.14*(x/180.0); while(y<(n+1)) { g=y; if(g%2==0) … | |
Re: Perhaps you should try this like this- char * ret=new char [n]; for a one dimension array | |
Re: You must read this for pointers-[URL="http://www.eternallyconfuzzled.com/"]http://www.eternallyconfuzzled.com[/URL] I think that you might be unable to access the value stored in the returned memory address , so you could point to that memory address to get the value for getting the things right :) | |
Re: Yes please tell what exactly you wish to know? Is it concatenation of 2 nos or two strings? | |
Re: You may opt for Java because its a new language that is yet to be developed instead of C or C++ . The latter have become full fledged,vast. There are thousands of sites which use java applets. Java is currently very popular , much more than the others. For me … | |
Hello once again . My teacher has given us the assignment to enter a string a [B]maximum of 7 charecters[/B] and permute it. Then print all of possible permutations . Like if the inputted word is JAY so Output would be JAY AJY AYJ JYA YAJ YJA I do not … | |
Re: this is my code but you would need to change the headers as per new rules of C++ [code=cplusplus] #include<iostream.h> #include<conio.h> #include<string.h> #include<stdio.h> int main() { char a[100]; char b[100]; cout<<"enter sentence"<<endl; cin.getline(a,100); strcpy(b,' '); strcat(b,a); strcpy(a,b); int x,y,len,k; len=strlen(a); k=len; for(x=len-1;x>=0;x--) { if(a[x]==' ') { for(y=x+1;y<=k;y++) cout<<a[y]; k=x; } … | |
Re: if n=1128(int type) use this- [code] while(n>0) { digit=n%10; //extract individual digit to use cout<<digit<<endl //or do any operation on it n=n/10; //reducing the n by 10 so that it finally turns to (0.something) } [/code] I hope it works:) | |
Re: You can extract the no.'s digits by this method : if n is user's input of int type then while(n>0) { n=n/10; digit=n%10; if(digit==4) counter++; } Then print the counter that contains the no. of 4's in your inputted number | |
Re: char array="food"; You can use delete[]array to clear the memory | |
Hi to all , I wished if any one of you could throw light on [B]mechanism of insertion sorting in C++[/B]. I know what is bubble sorting but I had confusion regarding what is insertion sorting? In school my professor had mentioned about it, but I do not have any … | |
Re: Well Narue is really right. Not only her explainations are perfect but also her links proved worthy to me. You must surely check the links given by her as they use latest trend of C++ and are precise and accurate. | |
Actually I have been trying to change my member profile features for quite some time but did not succeed . Wish any one could help me. The member profile page has something called "[B]Member Certificate"[/B] but I do not what is it? | |
Re: So what is it that you basically require? - an array of removed duplicate integers , or printing the array once with no duplicates but containing those nos which previously had a duplicate along with the remaining numbers of the array . Please clarify this doubt. May be then , … | |
Re: You could perhaps have a look at [url]www.cprogramming.com/tutorial/lesson11.html[/url] also | |
Re: [code=c++] #include<iostream.h> #include<stdio.h> #include<conio.h> #include<process.h> int main() { char myString[100]; cout<<"Your statement"<<endl; if(cin.get(myString,100)) cout<<a; else exit(0); return 0; }[/code] Perhaps you could try out this but I have used at least once the concept of char array which is also called c-style string. // these header files do not exist … | |
Re: Hello even i would try to help. It ca be simple like this in [B]int main[/B]() you can incorporate a few more lines: [code=cplusplus] int choice; cout<<"enter your choice"; cin>>choice; if(choice==1) search(collection,4,albumname); else cout<<"no album found" cin.get(); return 0; } void search(Album collection[], int size, string albumName) { for(int i … | |
Re: I think the same .Bops you must use it as in C++ [code=c] #include<iostream.h> #include<stdio.h> void main() { char a[100]; cout<<"enter your sentence"; gets(a); for(int x=0;a[x]!='\0';x++) { if(a[x]=='|') a[x]=' '; cout<<a[x]; } } [/code] This in C++ may be it might help you in C The logic is correct. | |
Could you please give some info regarding - What are basically linked lists . I know that they can be used as arrays and stacks and queues. But confused a bit about FIFO and LIFO CONCEPTS. I cant understand how do we always access the stack from top.It is just … | |
Re: I would say that you first start reading the book acoording to your course and if you have any queries,solve it in this forum.I think that is the best way to reach your goal. Practice makes a person perfect. So you could even try out simple problems given here and … | |
HELLO THIS IS MY FIRST POST. I WISHED IF ANY ONE COULD HELP IN EXTRACTING WORDS FROM A CHAR ARRAY -STRING LIKE IF THE SENTENCE INPUTTED BY USER - [B]JACK WENT UP [/B] THEN I NEED TO PRINT THESE WORDS SEPARATELY ON FRESH LINES OUTPUT- JACK WENT UP [B] I … | |
Re: JUST REPLACE a WITH 0 IN --for(int x=a-1;x>-=0;x--) THAT YOU COULD ACCESS THE WHOLE LENGTH OF THE STRING YOU KNOW THAT CHAR ARRAYS ARE ZERO INDEXED THEY START FROM 0 TO (LENGTH -1) |