User Profile

Collapse

Profile Sidebar

Collapse
hello12
hello12
Last Activity: Jan 21 '08, 03:41 AM
Joined: Oct 3 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • hello12
    started a topic Finding minimum normalized positive number
    in C

    Finding minimum normalized positive number

    Hello,
    I was asked to write a C program to find minimum normalized positive number that can be represented in my computer. I know that the value is 2.2250738585072 014e-308.
    I wrote the program to find the machine precision. Now i need to make some parameter changes to this program to find the min. number given above.
    do
    {
    Epsilon = Epsilon/2.0 ; //Variable value is halved until the smallest
    ...
    See more | Go to post

  • hello12
    replied to Text file reading
    in Java
    I figured it out.
    See more | Go to post

    Leave a comment:


  • hello12
    started a topic Text file reading
    in Java

    Text file reading

    Hello,
    I was wondering how to get a particular line from a text file. I wanted to output specific lines from a textfile to the console. but the ways i tried is giving me the whole text file. Any help would be great!!
    Thanks in advance
    See more | Go to post

  • hello12
    replied to tokens to string
    in Java
    yes i tried your method too.. it is giving me the same result. I guess i would have to make some changes in the reverseFunction for your method ro work.I'll keep trying by finding what string.split() does and by changing reverseFunction around :)
    thanks
    See more | Go to post

    Leave a comment:


  • hello12
    replied to tokens to string
    in Java
    when i try reversing like you said by passing the string line to reverse function it is even reversing the string.
    Eg: Hello World! ---> !dlroW olleH
    but i want ----> olleH !dlorW
    See more | Go to post

    Leave a comment:


  • hello12
    replied to tokens to string
    in Java
    this is my first asiignment i was kind of exploring different types and methods.. i guess :)
    See more | Go to post

    Leave a comment:


  • hello12
    replied to tokens to string
    in Java
    sorry i forgot the documentation part
    try{
    //reads from file
    BufferedReader Buf = new BufferedReader( new FileReader(File name));
    String line;

    while((line = Buf.readLine()) != null){

    StringTokenizer token = new StringTokenizer (line);
    int number = token.countToke ns();...
    See more | Go to post

    Leave a comment:


  • hello12
    replied to tokens to string
    in Java
    I tried the code it's working but there is a problem..
    I tokenized the sentences from a file
    Hello World
    Good Morning Everyone!!
    I was suppose to reverse each word and output the result: right now i am
    getting
    olloH dlroW dooG gninroM !!enoyrevE ( how do i make this into 2 different lines like in the file)?
    try{
    BufferedReader...
    See more | Go to post

    Leave a comment:


  • hello12
    replied to tokens to string
    in Java
    StringTokenizer .
    See more | Go to post

    Leave a comment:


  • hello12
    started a topic tokens to string
    in Java

    tokens to string

    I am a newbie at Java. I am doing an assignment on string manipulations. Can anyone give me tips on how to make tokens back into a sentence.
    Eg.
    Good ------>(to) Good Morning Everyone!!
    Morning
    Everyone!!
    thanks in advance
    See more | Go to post

  • hello12
    replied to reversing characters in a word
    in Java
    it worked!!!!! thankyou.
    i changed the code a little bit..
    for(int i = (temp.length() -1); i>=0;i--)
    See more | Go to post

    Leave a comment:


  • hello12
    replied to reversing characters in a word
    in Java
    I was trying to work on the code but i keep getting the error
    cannot find symbol
    symbol : method size()
    location: class java.lang.Strin g
    for(int i = (temp.size()-1);i>=0;i--)
    I did import java.io and java.util in the beginning of the program.
    thanks in advance :)
    See more | Go to post

    Leave a comment:


  • hello12
    started a topic reversing characters in a word
    in Java

    reversing characters in a word

    Hello,
    I am new to java and i was having a hard time figuring out on how to do certain string manipulations. I was asked to read in a text file and reverse the words. So far, I have put all the words in the text file into an arraylist.
    For example...
    Hello World. ---> must be printed out as --> olleH .dlroW
    right now when i print my arraylist i am getting
    ...
    See more | Go to post

  • hello12
    started a topic matrix multiplication (1d to 2d mapping) lost!!!
    in C

    matrix multiplication (1d to 2d mapping) lost!!!

    hello,
    i have 2 upper triangular matrices A and B.. the values are stored in efficient format in the text file. I wanted to use those values for matrix multiplication and display the result C on the screen.
    I am supposed to use 1d arrays. SO, basically i have 2 --> 1d arrays which i am supposed to multiply to get C[i].C[i] must not store zeroes(i.e it must also be in efficient format).

    I am having trouble in...
    See more | Go to post

  • hello12
    started a topic confused with strcat() :(
    in C

    confused with strcat() :(

    hello,
    I am supposed to concatenate 2 strings (words). For this the function should call malloc or calloc to get memory for the newstring(after concatenated) .I am not allowed to use the library string.h. I figured out to find the length of the 2 strings. .. but i don't get how to concatenate the two words.
    P.S This is the first time i am doing program with dynamic memory allocation.

    so far this is my code:
    Code:
     #include<stdio.h>
    ...
    See more | Go to post
    Last edited by Niheel; Oct 6 '06, 02:12 AM.

  • hello12
    started a topic storing word from a file into 2d array
    in C

    storing word from a file into 2d array

    hello,
    i am having trouble storing word from a text file into a 2d array in C. the array size is 20 by 20 and i am required to store one word in each row. For some reason i don't get how to use a nested for loop to switch to next row after reading the first word.
    This program is for sorting the words lexicographical ly into another text file.I am not allowed to use string header for this.
    any help would be appreciated
    ...
    See more | Go to post
No activity results to display
Show More
Working...