- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 6
- Posts with Downvotes
- 5
- Downvoting Members
- 3
14 Posted Topics
Use fgetc to get the first character and then you can use the switch-case statement to work accordingly.
iniatialise flag=0 instead of [CODE] else putchar('\n');flag=0; [/CODE] use [CODE] else if(c!=' ' && c!='\t' && c!='\n' ) if(flag==0) { putchar('\n'); flag=1; } [/CODE]
1.You can use the remove() (similar to add()) method available to remove all the component before setting the visible to false. 2.Better, you keep a flag variable to test whether button 1 is pressed 1st time or 2nd time. When 1st time it is pressed, do the usual procedure else …
Here is own code in which i have put the method to calculate number of head and tail and their respective percentage without using if-else operator. Please note this would run if user input small letter. If you want to put it for capital letter then you can change it …
If you want to keep the number of attempt to be in the memory. Then you can store it the file. Like if one enter wrong password once and then closes the program, then also there will be only two attempt left as you are storing the last attempt in …
What function have you use to write the data into the file...need to know a lot about code to answer this. Post your code.
the code is fine and will work........do you want help with the code
1. Comment are good.Keep it up. 2. I agree any memory that you allocate should be freed. 3. You can always use the pointer that you are returning to free the memory. 4. Instead of calling malloc several time toString is called, allocate it in main once and send it …
This happen because scanf pick up character only till it doesnt see a whitespace('\n' or '\t' or ' '). The rest remained stored in the buffer and is pick up next. scanf("%[^\n]s", str2); Writing the above command mean it will pick up character until '\n' is not found. Using fgets …
Dear, Adding n to a pointer mean go to nth location starting from here. Adding 1 would make make the pointer go to next memory location. Now, j is an integer pointer. Therefore its size is 4 (in linux). Hence it move to next 19 memory location i.e. 4*19+10=86. If …
The End.
navedalam