No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
5 Posted Topics
How about this code? This is more efficient in space as well as time. import java.io.*; public class mainClass1{ static void reverse(char[] stringTobeReversed) { System.out.println(stringTobeReversed); char temp; for (int i=0; i<(stringTobeReversed.length)/2;i++ ) { temp = stringTobeReversed[i]; stringTobeReversed[i] = stringTobeReversed[stringTobeReversed.length-i-1]; stringTobeReversed[stringTobeReversed.length-i-1] = temp; } System.out.println(stringTobeReversed); } public static void main(String[] args) …
Just to add to the information by sepp2k: A pointer is basically supposed to hold address of what it is asked. Doesnt matter if it points to a single character, a float, a huge array or a complex structure. What pointer will hold is always going to be an address …
@rithish: your warning will go out once you have a semicolon at the end of line 11/ as suggested by deceptikon. To learn a little more about structures - please refer : http://www.crasseux.com/books/ctutorial/Nested-structures.html
Either change : char cColor; scanf(" %c",&cColor); to int cColor; scanf(" %d",&cColor); OR change all your conditions as follows: else if(Random1==1&&cColor=='1')
I am trying to learn C and have written a simple program that accepts the string from user and prints it. Would you loke to suggest me anything on my practices? I need to learn it very well. so please help me improving myself. Here goes my code: //Dynamic Array …
The End.
teachMyself