Question about Intel Pentium 4 505J Prescott 533MHz (INTELP4505J)

1 Answer

Write a program in C to reverse each word at its own position in a string

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.

  • Contributor
  • 1 Answer

HI..this is a program in C++..plz convert it to C by simply making some changes in the header files and cout, cin statements..

#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
#include<stdio.h>
void main()
{clrscr();
char ch[100];
cout<<"\n Enter a Character: ";
gets(ch);
for(int length=0;ch[length]!='\0';length++);
for(int i=0,j=length;i!=j;i++,j--)
{char temp=ch[i];
ch[i]=ch[j];
ch[j]=temp;
}
cout<<"\n Reversed String: ";
puts(ch);
getch();
}

Posted on Mar 07, 2009

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

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

×

Loading...
Loading...

Related Questions:

1 Answer

How to write a program to translate english text to binary string and write a program to do inverse 27 = . , 28 = , 29= ? 30 = . 31=


to convert from text to binary, you would do something along the following lines..
1. have the user enter a string.
2. loop through the string (for each char in stringEntered..)
3. convert the character to binary using the methods provided to you by your language of choice

For the reverse (binary to text):
you must take 8 bits of data (which would be a single character), and convert it to text using the methods provided by your language of choice..

here's some links that might be of interest to you.
Visual FoxPro VFP CTOBIN and BINTOC Functions Equivalent In Net The Most Accurate and Reliable Source Code Converters

Feb 06, 2015 | Microsoft Visual Studio 6 6.0 Professional...

Tip

How to connect Bluetooth GPS using mobile phone


<p>Once I explain how Bluetooth GPS receiver to connect from a mobile phone. Bluetooth GPS Receiver is a device that continuously transmits its position (longitude, latitude and speed) using the Bluetooth protocol. If your phone is Bluetooth-enabled phone, you can connect to a Bluetooth GPS receiver to determine its position. To locate, connect to Bluetooth GPS and mobile phone to get the NMEA sentences for location tracking, you can also program a Java (J2ME) for your phone. Your program should do the following tasks: <br /> <p><br /> <p>1. Bluetooth device within the search area. Each time a Bluetooth device is discovered, discovery listener device Discovered trigger procedure. In the search is completed, the trigger listener discovery process inquiry Completed. <br /> <p><br /> <p>2. Get the name Bluetooth. We have a choice to a group list of Bluetooth-friendly name of the devices found to store. We also need a vector to devices found to store. <br /> <p><br /> <p>3. Select Bluetooth GPS receiver from the list of found devices. <br /> <p>4. Find service by the GPS device. Bluetooth GPS Receiver provides an L2CAP service so that the program needs to find this service for GPS url connection string for. <br /> <p><br /> <p>5. Get connection string from the GPS device. Connection string to the URL will have this format Url = "btspp: Address / bluetooth /:" + + L2CAP_UUID "permission = false; encrypt = false"; <br /> <p><br /> <p>6. Sign up and receive sentences from the GPS device. After plugging in the url in step 5, you can open the connection and extract sentences from the connection string. <br />

on Jun 26, 2011 | Cell Phones

1 Answer

Divide the word Dangerous into syllabes


(sounds like a school assignment to me) ;-)

-count (& save) the 3 characters (1st syllable).
-start at position 4 (3+1 chars) in the string.
-count (& save) the 3 characters (2nd syllable).
-start at position 7 (6+1 chars) in the string.
-count (& save) the 3 characters (3rd syllable).

Logic:

-Initialize syllable-counter (x) to 1, position-counter to 1 (z).
-Initialize syl(x) strings to Null, where x = 1 to 3.
-Assign "dangerous" to string variable.

z = 1
y = 1
x = 1
string = "DANGEROUS"

For x = 1 to 3 DO
*Comment. read 3 chars (in a loop), add them to Syl (x).
For y = 1 to 3 DO
read a char(y) from the string at position-counter(z)
syl(x) = syl(x) + char(y)
z = z + 1
END DO
END DO


NOTE: not 100%, but close.

May 13, 2014 | Computers & Internet

1 Answer

Jessie doll string in the pulled position


Sometimes you can get the string cord to release and retract back. Hold the doll firmly and gently pull the string out about an extra two or three millimetres (eighth of an inch) or as much as possible. Keep the string tight for a short while and then allow it to retract slowly. It may take a few attempts, the skill is in pulling the string that little extra distance, holding it for a few moments, then slowly releasing it again.

Dec 30, 2013 | Toys

2 Answers

What is strings in java?


Handling character strings in Java is supported through two final
classes: Java String and StringBuffer. The String class implements immutable character strings, which are read-only once the string has been created and initialized, whereas the StringBuffer class implements dynamic character strings. All string literals in Java programs, are implemented as instances of String class. Strings in Java are 16-bit Unicode.

Nov 21, 2012 | Sun Java Programming Language (cdj-275)

1 Answer

Create a program that asks for a sentence. Your program will then check if the sentence is a palindrome or not.


Palindrome using C#.net

using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string str=string .Empty ;

Console.WriteLine("Enter a String");

string s = Console.ReadLine();

int i = s.Length;
//we can get the Length of string by using Length Property

for (int j=i -1; j >= 0; j--)
{
str = str + s[j ];
}
if (str == s)
{


Console.WriteLine(s + " is palindrome");


}
else
{
Console.WriteLine(s + " is not a palindeome");
}

Console.WriteLine(str);

Console.Read();


}

Nov 30, 2010 | Computers & Internet

3 Answers

A java code for anagram


import java.io.IOException;

public class AnagramApp {
static int size;

static int count;

static char[] charArray;

public static void main(String[] args) throws IOException {
String input = "Java Source and Support";
size = input.length();
count = 0;
charArray = new char[size];
for (int j = 0; j < size; j++)
charArray[j] = input.charAt(j);
doAnagram(size);
}

public static void doAnagram(int newSize) {
int limit;
if (newSize == 1) // if too small, return;
return;
// for each position,
for (int i = 0; i < newSize; i++) {
doAnagram(newSize - 1); // anagram remaining
if (newSize == 2) // if innermost,
display();
rotate(newSize); // rotate word
}
}

// rotate left all chars from position to end
public static void rotate(int newSize) {
int i;
int position = size - newSize;
// save first letter
char temp = charArray[position];
//shift others left
for (i = position + 1; i < size; i++)
charArray[i - 1] = charArray[i];
//put first on right
charArray[i - 1] = temp;
}

public static void display() {
System.out.print(++count + " ");
for (int i = 0; i < size; i++)
System.out.print(charArray[i]);
System.out.println();
}
}

Nov 22, 2010 | Computers & Internet

1 Answer

Source code of a program


import java.util.*;
public class StringReverse {
  public static void main(String[] argv) {
    //+
    String s = "Support Tech Problem";

    // Put it in the stack frontwards
    Stack myStack = new Stack();
    StringTokenizer st = new StringTokenizer(s);
    while (st.hasMoreTokens()) myStack.push(st.nextElement());

    // Print the stack backwards
    System.out.print('"' + s + '"' + " backwards by word is:\n\t\"");
    while (!myStack.empty()) { 
      System.out.print(myStack.pop());
      System.out.print(' ');
    }
    System.out.println('"');
    //-
  }
}

Apr 07, 2009 | ArcMedia JavaScript Source Code 3000 Pro...

2 Answers

Visual basic 6.0


Use a compare (instr) command to search the sentence for punctution and spaces. Increment a variable for each word found, resetting the search string and retaining the start position of each find.

Feb 27, 2008 | Computers & Internet

Not finding what you are looking for?
Intel Pentium 4 505J Prescott 533MHz (INTELP4505J) Logo

Related Topics:

329 people viewed this question

Ask a Question

Usually answered in minutes!

Top Intel Computers & Internet Experts

Tony

Level 3 Expert

2600 Answers

David
David

Level 3 Expert

778 Answers

Computer Links

Level 3 Expert

2385 Answers

Are you an Intel Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...