Solved

Writing to an output file

Posted on 2009-04-12
4
170 Views
Last Modified: 2012-05-06
a)      Read the file A o/p-> aaaaaaabbbbbbb&&&..ppppppp

b)      Read the file B o/p -> 11111112222222&&&&00000001111111

 2. The o/p of the file c based on the outputs of the files a & b. The output of the file C                                                                
      should be like using interleaving techniques.

            aaaaaa1111111bbbbbbb22222222&&&&.

  3. The output of the file D should be the o/ps of the above 3 files

aaaaaa1111111aaaaaa111111&&&&..bbbbbb222222222bbbbbbbb2222222&&&&&..



This is what the requirement for an interview.Please help me to solve this problem in C language

0
Comment
Question by:mani_tecit
  • 2
  • 2
4 Comments
 
LVL 53

Expert Comment

by:Infinity08
ID: 24128395
>> Please help me to solve this problem in C language

Ok. What is the problem you have with it ? Did you give this a try and get stuck somewhere ? What's your level of experience with C (do you for example know how to do file I/O) ?
0
 

Author Comment

by:mani_tecit
ID: 24128542
No experience at all with C language.Coming from accounts domain.

Please help me yaar..
Thanx in advance
0
 
LVL 53

Accepted Solution

by:
Infinity08 earned 130 total points
ID: 24128564
If you have no experience with C, may I suggest to start with reading a basic tutorial about C to teach you the basics ? Because otherwise, no matter what I say will probably not help you very much. Here is one if you're interested :

        http://www.cprogramming.com/tutorial.html#ctutorial

If you're serious about learning C, I suggest buying a book, and reading through that, but most of all, do a lot of exercises, and keep practicing. Here are some very good books about C :

        "The C Programming Language" by Kernighan and Ritchie (second edition) (THE reference guide)
        "A Book on C" by Kelley and Pohl (a pretty good and complete book to learn from)

Regarding your current question, the idea would be to read both input files, recognize the boundaries where the text is supposed to be split up, and write the correct output to both of the output files.
0
 

Author Comment

by:mani_tecit
ID: 24129334
Ok.Thanx infinity
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

806 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question