Question about Operating Systems

1 Answer

Write a program for analyzing which of severaol diff.vowels ,cont

Write a program for analyzing a line of text stored in a file by examining each of the characters and displaying into which of several different categories vowels, constants, digits, white spaces it falls. count of the number of vowels consonants, digits and white space characters, include an appropriate documentation in your program

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.


    An expert that hasĀ over 10 points.

    Problem Solver:

    An expert who has answered 5 questions.

  • Contributor
  • 10 Answers

# Since no language was specifiec, here's a solution in the
# gawk dialect of awk.
# Familiarity with awk is assumed, so only minimal comments
# are present. I have a version with more comments...


{ r0 = $0 } # Copy the input record into the variable r0, for efficiency

wc += gsub(/[[:blank:]]+/, "", r0) {} # Destructively count all the white spaces in r0

vc += gsub(/[AEIOU]/, "", r0) {} # Destructively count all the vowels in r0

cc += gsub(/[BCDFGHJKLMNPQRSTVWXYZ]/, "", r0) {} # Destructively count all the consonants in r0

printf("%d vowel%s\n", vc, (vc != 1) ? "s" : "")
printf("%d consonant%s\n", cc, (cc != 1) ? "s" : "")
printf("%d white space%s\n", wc, (wc != 1) ? "s" : "")

Posted on Jan 02, 2009

  • Galen Tackett Jan 02, 2009

    Sorry, that was all nicely indented until I forgot that all the leading spaces got trimmed off...

  • Galen Tackett Jan 05, 2009

    I will try to post a properly indented version soon...


Add Your Answer

Uploading: 0%


Complete. Click "Add" to insert your video. Add



Related Questions:

2 Answers

Can anyone explain how batch file works?

This is kind of tricky not knowing how familiar you are with the commandline, but a batch file simply contains single commands and executes them in order (usually from top to bottom). A batch file (or bash script in Linux) can be very helpful if you have to run certain commands over and over again, so you don't have to write them by hand.

An Example: You want to store your network settings in a text file.
You open the command prompt (WIN+R) and type this line:
mkdir C:\Network
Then you type this line:
ipconfig /all > C:\Network\ipconfig.txt
The first line creates a folder on your C: drive called "Network"
The second line runs the ipconfig command and saves it as a text file in that new folder.

To make a batch file, you open Notepad and insert the two lines. Then save it as "IP.bat" (make sure not to save it as "IP.bat.txt"! This is the most common mistake. If you save a file from Notepad, select "All Files" in the "Save As Type" dialog. Otherwise it will save it as a .txt file and you have to rename it later.)

Now you can double click the batch file and it runs all commands in the file.

You can also see the danger. If you run a batch file and don't know what it really does, it can destroy your whole system. So make sure you understand it and/or get it from a trustworthy source.

A nice example of how complex a batch file can be is here:

Copy the content into a text file, save it as AllHelp.bat, run it and it will create a webpage with all available DOS commands.

Hope this helps - otherwise let me know if you have specific questions.

Feb 26, 2012 | HEWLETT-PACKARD Operating Systems

3 Answers

What is pdf

PDF is a kind of file format introduced by Adobe Inc in 1993. It has the feature of non-editable and easy to share, so widely used in all over the world.
There are many tools could help us to create a PDF file, such as the famous Adobe Acrobat Pro and Nemo PDF series tool. They are both great choice for you.

Jul 07, 2011 | Microsoft Windows XP Professional With...

1 Answer

When i try to shut down my computer a blue screen appears with an error report : stop:c000021a {fatal system error}

Hi there,

This is the cause:
The STOP 0xC000021A error occurs when either Winlogon.exe or Csrss.exe fails. When the Windows NT kernel detects that either of these processes has stopped, it stops the system and raises the STOP 0xC000021A error. This error may have several causes. Among them are the following:
  • Mismatched system files have been installed.
  • A Service Pack installation has failed.
  • A backup program that is used to restore a hard disk did not correctly restore files that may have been in use.
  • An incompatible third-party program has been installed.
If possible contact a local technician to the do the below,if you are not sure of this process.
and also ask him to take a backup of your registry keys and create a system restore point without fail.

To troubleshoot this problem, you must determine which of these processes failed and why.

To determine which process failed, register Dr. Watson as the default system debugger (if it is not already the default debugger). Dr. Watson for Windows NT logs diagnostic information about process failures to a log file (Drwtsn32.log). Also, you can configure this program to produce memory dump files of failed processes that you can analyze in a debugger to determine why a process fails.

To set up Dr. Watson to trap user-mode program errors, follow these steps:
  1. At a command prompt, type System Root\System32\Drwtsn32.exe -I, and then press ENTER.

    This command configures Dr. Watson as the default system debugger.
  2. At a command prompt, type System Root\System32\Drwtsn32.exe, and then select the following options: Append to existing log file
    Create crash dump
    Visual Notification
  3. After the computer restarts from the STOP 0xC000021A error, run Dr. Watson (Drwtsn32.exe).
  4. View the Dr. Watson log to determine what user mode process may be causing the problem.
  5. If the Dr. Watson log does not contain sufficient information to determine the cause of the problem, analyze the User.dmp file to determine the cause of the STOP 0xC000021A error.

    If Dr. Watson did not create a User.dmp file for either Winlogon.exe or Csrss.exe, you may have to use a different tool to generate a memory dump file of the process that fails. For more information, click the following article number to view the article in the Microsoft Knowledge Base: 241215 ( ) How to use the Userdump.exe tool to create a dump file Note Follow the instructions in the Knowledge Base article to troubleshoot a process that shuts down with an exception. While you follow these instructions, monitor the following processes to troubleshoot the STOP 0xC000021A error:
    • Winlogon.exe
    • Csrss.exe
    Note Most STOP 0xC000021A errors occur because Winlogon.exe fails. This typically occurs because of a faulty third-party Graphical Identification and Authentication (GINA) DLL. The GINA is a replaceable DLL component that Winlogon.exe loads. The GINA implements the authentication policy of the interactive logon model. The GINA performs all identification and authentication user interactions.
It is very common for certain types of remote control software to replace the default Windows GINA DLL (Msgina.dll). Therefore, a good first step is to examine the system to see if it has a third-party GINA DLL. To do this, locate the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Value = GinaDLL REG_SZ
  • If the Gina DLL value is present and if it is anything other than Msgina.dll, it probably means that a third-party product has changed this value.
  • If this value is not present, the system uses Msgina.dll as the default GINA DLL.
If this error first occurred after the installation of a new or updated device driver, system service, or third-party program, the new software should be removed or disabled. Contact the manufacturer of the software to see if an update is available. For more information about hardware and software vendor contact information, visit the following Microsoft Web site: - ( Last known good configuration If the previous steps in this article do not resolve the problem, start the computer by using the last known good configuration. To start the computer by using the last known good configuration, follow these steps:Note Because there are several versions of Microsoft Windows, the following steps may be different on your computer. If they are, see your product documentation to complete these steps.
  1. Click Start, and then click Shut Down.
  2. Click Restart, and then click OK.
  3. Press F8 at the indicated time:
    • For an x86-based computer: When a screen of text appears and then disappears , press F8. (The screen of text may include a memory test, lines about the BIOS, and other lines.) There may also be a prompt that tells you when to press F8.
    • For an Itanium architecture-based computer: After you make your selection from the boot menu, press F8. There may be a prompt that tells you when to press F8.
  4. Use the arrow keys to select Last Known Good Configuration, and then press ENTER.

    NUM LOCK must be off before the arrow keys on the numeric keypad will function.
  5. Use the arrow keys to highlight an operating system, and then press ENTER.

Dec 23, 2010 | Operating Systems

1 Answer

+WhenIdownload a program in Microsoft Word I can't read it . What can be wrong?

The files that can be interpreted by MS Word must be in the formats recognized as valid text or formatted text files. Program files are not interpretable by MS Word.

Jul 24, 2010 | Microsoft Windows XP Home Edition

2 Answers

How to check the content of two files are same or not

If you want to verify two files are the same, there is a thing called a Checksum. These are used to verify data is copied correctly by identity of a number string. If the number is different on the receiving party then the file was changed either intentionally or accidentally in the process of copying. There are different programs on the internet you could use any one to run a checksum or "hash check" of the file you are comparing..
ChecksumChecksum questioningquestioning

Mar 09, 2010 | Apple OSX 10.3 for Unix, Mac

3 Answers

What is *.ini files ? how can i create it ? what is the use of it ?

.INI files are plain-text files that contain configuration information. These files are used by Windows and Windows-based applications to save information about your preferences and operating environment. "INI" stands for initialization.
Format of .INI Files.INI files contain one or more sections. Each section begins with a section name, which is followed by zero or more entries. An entry associates a keyname with a value. The general format is:


Comments can also be included in the file by prefacing the comment with a semicolon (;).

Windows and Windows for Workgroups use several standard .INI files for storing configuration information. These files are WIN.INI, SYSTEM.INI, PROTOCOL.INI, PROGMAN.INI, CONTROL.INI, WINFILE.INI, MSMAIL.INI, SHARED.INI, and SCHDPLUS.INI. Windows-based programs may also add sections and entries to WIN.INI, and they may add .INI files in the Windows directory.

Editing .INI FilesBecause .INI files use only plain text, they can be edited using any text editor or word processor. .INI Master also has a built-in text editor for making corrections in the .INI files you are diagnosing.

To create a custom Setup.ini file:
  1. Start the Setup INI Customization Wizard.
  2. Type the path to your Office XP administrative installation point, and then click Next. The wizard searches the specified network share for a Setup.ini file.
  3. From the administrative installation point, select an INI file on which to base your custom INI file. Or, click Browse to go to a different location and select a file. Click Next.
  4. Under Logging, select a logging mode, and then type a name for the log file or template. Click Default to use the logging mode that is specified in the INI file. Click Verbose to use all logging options. Note that verbose logging creates very large log files.
  5. Under Display, select a default display setting, and then click Next. The wizard searches the administrative installation point for additional packages (MSI files) that you can chain to the Office installation.
  6. Select the check boxes next to the packages that you want to include in your custom INI file, add packages or programs (EXE files) that are stored in another location, and then click Next.
  7. Use the arrow keys to determine the order in which you want Setup.exe to install the chained packages. The System Files Update package is always installed first (if required), followed by the Office XP package. You can change the order in which subsequent chained packages are installed.
  8. Select each package, specify the options that you want for that package, and then click Next. For each package, you can specify an MST file and a unique display setting, as well as additional property values.
  9. To add additional property-value pairs to your custom INI file, select a package, click Advanced Properties, type the properties and values that you want, and then click Next. The wizard displays a summary of the changes to save in the custom INI file.
  10. Click Save As, and then type a name and path for your INI file. The wizard supplies a sample Setup command line that specifies your custom INI file with the /settings option.
  11. Click Finish to quit the wizard.

May 12, 2009 | Microsoft Windows XP Professional

1 Answer


Hijackthis is a first line tool to examine certain areas of the computer. It does not show everything and lots of malware is hidden from it

To download Hijackthis

go to and download 'Hijack This!' self installer. Save it to the desktop or other suitable place. DO NOT just press run from the website Double click on the file and it will install to C:\program files\hijackthis and create an entry in the start menu.
Click on the entry in start menu to run HijackThis
Click the "Scan" button, when the scan is finished the scan button will become "Save Log" click that and save the log.
Go to where you saved the log and click on "Edit > Select All" then click on "Edit > Copy" then PASTE THE LOG BACK HERE AS A REPLY It will possibly show issues deserving our attention, but most of what it lists will be harmless or even required,
so do NOT fix anything yet.
Someone here will be happy to help you analyze the results.
you can also e-mail me

May 11, 2008 | Operating Systems

2 Answers

Reagrding the path of device for desk top installation of running of other programs to virus infection

just try with avast 4.8 (download it from do a system scan by disabling the system restore
post your findings

May 11, 2008 | Microsoft Windows XP Professional for PC

2 Answers

Trojans, worms, viruses, antispy.... no credit card

1. Turn your computer off.
2. Go to a friends computer.
3. Download Spybot - S&D, Lavasoft's Ad-Aware, and Avast Home along with the Avast VPS download.
4. Burn programs to a CD.
5. When your computer boots up press F8 during bios boot.
6. You will get a black and white menu, select safe mode.
7. In safe mode, select yes to the first popup.
8. Install Avast and select scan on next boot, and select restart later. Then install VPS file by double clicking it. When popup comes on restart computer and wait.
9. Delete anything that is infected.
10. When windows finishes booting run Spybot and Ad-Aware.

Mar 03, 2008 | Microsoft Windows XP Professional With...

1 Answer

I need a program in turbo c that would count the vowels in the sentence using for loap

Here's an example:

//This is the array of characters that holds your sentence.
char YourSentance[];

//This is all of the Vowels, note that capitol and lower case are
//considered different.
char Vowels[]={'a','e','i','o','u','A','E','I','O','U'};

//This holds the counter of how many vowels we find
int NumVowels=0;

//Loop through the Sentence using i until we encounter a 0
//which signifies the end of the string
for(int i=0;YourSentance[i]!=0;i++) {
//Now loop through the vowels
for(int x=0;Vowels[x]!=0;x++) {
//Check to see if this character is a vowel
if(YourSentance[i]==Vowels[x]) {
//If it is, increment NumVowels, and end the loop early
break; // This line optional

//Now NumVowels contains a count of how many vowels
//we found
printf("There are %i vowels in the sentence.\n",NumVowels);

Feb 29, 2008 | Operating Systems

Not finding what you are looking for?
Operating Systems Logo

Related Topics:

149 people viewed this question

Ask a Question

Usually answered in minutes!

Top Operating Systems Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18304 Answers

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Prashant  Sharma
Prashant Sharma

Level 3 Expert

1127 Answers

Are you an Operating System Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides