Comment

derrick
im stuck,
May 5, 2010 at 9:39 PM

I'm taking my first C++ class and I cannot figure out this question. After the following code executes, item has the value...??
string item = “ABCX34”;
item.replace(3, 1, “D”);

would it be..
ABCD34
ABD234
DDDX34 or
ADDD34
and for me could you explain why this is?

thanks everyone!
View All Comments | View Tutorial
Advertisement
Related Tutorial and Articles
JSP Servlet Questions

stuck
 

Java Beginners

basic c/c++ questions
basic c/c++ questions  Are the Control statements like if(),while() in built functions? if no, why not as they satisfy all the properties of a function 

Java Beginners

basic c/c++ questions
basic c/c++ questions  Are the Control statements like if(),while() in built functions? if no, why not as they satisfy all the properties of a function 

Java Beginners

C/C++ QUESTIONS
C/C++ QUESTIONS  ??Write a function for finding out the occurences of repeated word from a sentence. This function would return an array of duplicate words. 

Java Beginners

C/C++ QUESTIONS
C/C++ QUESTIONS  "Write a function for finding out highest and lowest marks obtained by a student from an array contained student name and marks". For Example : GetHighestLowestMarks{Student{n}, Marks{n}} returns 

Development process Questions

C++ Starter needs help :S
C++ Starter needs help :S  Hi, im 15 & im trying to learn how to program, i am starting with C & C++ since these are (what ive been told... questions abaut C++. Please help! :(   Please visit the following link: C 

Programming Tutorials

AJAX IM
AJAX IM       ajax im ("asynchronous javascript and xml instant messenger"... is updated in real-time via JavaScript.   Ajax IM (Ajax Instant Messenger 

Development process Questions

C/C++ - Development process
C/C++  I need the code for playing the backgammon game using C/C++.Im using turbo C. I`ve already design the board.I badly need the code for playing this game 

Java Interview Questions

C interview questions
C interview questions  Plz answer the following questions..... TECHNICAL - C /question number 1/ Code: int z,x=5,y=-10,a=4,b=2...? a. 5 b. 6 c. 10 d. 11 e. 12 /question number 2/ With every use of a memory 

Java Interview Questions

C interview questions
C interview questions  Plz answer the following questions..... TECHNICAL - C /question number 1/ Code: int z,x=5,y=-10,a=4,b=2...? a. 5 b. 6 c. 10 d. 11 e. 12 /question number 2/ With every use of a memory 

IDE Questions

c++ - IDE Questions
c++  how can i write a simple program in c++ that outputs 399 in words?thank you.  Hi Friend, C program to convert number to words: #include #include char *ch1[]={" "," one"," two"," three"," four"," five 

Java Interview Questions

C - Java Interview Questions
 

Struts Questions

Im not getting validations - Struts
Im not getting validations  I created one struts aplication im using... in s-c.xml But Im unable to get validations This is my validation.xml file...("failure"); } } } plz tell me where is the problem... Im unable 

Java Beginners

please iam stuck - Java Beginners
 

General

Ask C/C++ Questions online
Ask C/C++ Questions online       C and C++ are different programming language, but both the languages are popular among programmers. C is a general 

SQL Question

c# (ado.net)
c# (ado.net)   i am preparing a 180 query questions. how to make a groupbox that include 3 radio buttons named (YES, NO, CANCEL)when i select YES then, the YES is stored in the sql,when i select NO then, the NO is stored 

Java Beginners

im new to java - Java Beginners
im new to java  what is the significance of public static void main(string args[])statement  Hi Friend, This statement is necessary for a java class to execute it as a command line application. public- It provide 

Programming Tutorials

C++Tutorials
C++ Tutorials              C++ Tutorial Namespaces are a relatively new C++ feature just now starting to appear in C 

Java Interview Questions

Difference between C++ and Java - Java Interview Questions
Difference between C++ and Java  Basic difference between C... was derived from C++ but still there is big difference between these two... definition in C++, but there is no closing semicolon. 3. Forward reference 

Java Interview Questions

about c and java
about c and java   i need java and c language interview and objective questions with answers for the fresher.please provide to me   Please...://www.roseindia.net/c-tutorials/ http://www.roseindia.net/interviewquestions 

Java Beginners

questions
b. write a program to to calculate factorial of a no. c. write a program... to decimal. c. write a program to do following:- i) addition of two matrices 

Blog

Site map - C Tutorials
Index  | About-us | Contact Us | Advertisement | Ask Questions...; C Tutorials  | Java Tutorials | PHP Tutorials  | Linux...; | XPath Tutorials | HTML Tutorials C Tutorial Section C String Reverse 

Hibernate Questions

Im getting this error while running JPA project
Im getting this error while running JPA project  Exception in thread "main" javax.persistence.PersistenceException: [PersistenceUnit: examplePersistenceUnit] Unable to configure EntityManagerFactory 

Java Beginners

C Language - Java Beginners
C Language  1. What are extension files? Give examples. 2. What is operating system? What are the different types available? 3. What... answer for the above questions since it is very much needed urgently 

Development process Questions

C++ program not running
C++ program not running  Hi, this program need to ask 10 random questions with a random month name. Example: RUN How many days are there in the month of March? 28 No March has 31 days. How many days are there in the month 

Ajax Questions

c#
c#  how to find out the size of the BMP image in C 

CVS Questions

C++
C++  How can i write this in dev c 

Development process Questions

C++
C++  How can i write this in dev c 

Development process Questions

c++
c++  use a prgrm as an example to xplain-: a)class b)object c)message d)cope resolution operator 

Ajax Questions

c#
c#  how to find out the size of the BMP image 

Development process Questions

c++
c++  write a programme that calculates the area and circumference of a rectangle 

Development process Questions

C++
C++  dear sir How to create windows form application for login screen using C++? USER Name -TESTADMIN Password -testuser 

Java Beginners

c++
c++  i use turbo c++...i want to change the background color...what is the command for it and the header file used 

Java Beginners

c++
c++  i use turbo c++...i want to change the background color...what is the command for it and the header file used 

Java Beginners

c++
c++  i use turbo c++...i want to change the background color...what is the command for it and the header file used 

Development process Questions

C++
C++  differenciate btw.-a)local & public variables b)pre-defined & user defined functions c)fnctn prototype,defination & fnctn code.use code examples 

Development process Questions

c++
c++  differenciate btw.-a)local & public variables b)pre-defined & user defined functions c)fnctn prototype,defination & fnctn code.use code examples 

Development process Questions

c++
c++  differenciate btw.-a)local & public variables b)pre-defined & user defined functions c)fnctn prototype,defination & fnctn code.use code examples 

Design concepts & design patterns Questions

C++
C++  Trace the bubble sort using the following integers,which represent the elements in an array. 5,7,3,8,6,7,3 

Development process Questions

c++
c++  write a prgrm tht accepts 3 integer values,then with a function to swap the values 

Java Beginners

C++
C++  Describe the principle advantages of deploying a linked list versus a static array when implementing a Queue or a Stack 

Java Beginners

C#
C#  i need a code that will make program perform the basic operations upon the data Listview save, update and cancel 

Development process Questions

C++
C++  I have been asked to write a programme that gets five values,gets the sum,average and product please help me 

Development process Questions

C#
C# register form  i want to generate a user id automatically after filling their register form and i want to show their id to their email? please reply me soon 

UML Questions

c++
c++  Consider the following function: int funcExercise7(int list[], int size) { int sum = 0; for (int index = 0; index < size; index++) sum = sum + list[index]; return sum 

UML Questions

c++
c++  Consider the following declarations: class xClass { public: void... private members does class xClass have? c. How many constructors does class xClass.... Write a C++ statement that prints the values of the data members of the object 

Development process Questions

c++
c++  .write a program that accepts 5 subjects of a student,it should have a function to calculate the average & another function to grade.grade should be as follows-<40=E,40-49=D,50-59=C,60-69=B & >70 

Development process Questions

c++
c++  write a prgrm tht calculates the surface area of a cylinder.the prgrm shld find the circumfrance and have a function that calculates the fadius and another to calculate the surface area 

Development process Questions

C++
C++  write a prgrm tht gets five values,gets the sum,average &...; #include <conio.h> void main() { clrscr(); int a,b,c,d,e,sum; float average...;>b>>c>>d>>e; sum=a+b+c+d+e; average=sum/5; product=a*b*c*d 

Spring Framework Questions

c++
c++  write a program that gets a key or character from the keyboard and displays it ASII code in decimal, hexadecimal and binary form.It must also give a description of the key pressed 

UML Questions

c++
c++  Consider the following declarations: class xClass { public: void func(); void print() const; xClass (); xClass (int, double); private: int u... private members does class xClass have? c. How many constructors does class xClass 

CVS Questions

c++
c++  Write a console based C++ program that reads student information from a text file, build an array of objects of type class StudentInfo... name with the minimum GPA 7) Display Student GPAs as Letter Grades (A, B, C, D 

UML Questions

c++
c++  Characterize the following algorithm in terms of Big-O notation. Also find the exact number of additions executed by the loop. (Assume that all variables are properly declared.) for (int i = 1; i <= n; i++) sum = sum + i 

UML Questions

c++
c++  Characterize the following algorithm in terms of Big-O notation. for (int i = 1; i <= n; i++) for (int j = 1; j <= n; j++) for (int k = 1; k <= n; k++) cout << i + j + k 

UML Questions

C++
C++  . Consider the definition of the following class: class CC { public: CC(); //Line 1 CC(int); //Line 2 CC(int, int); //Line 3 CC(double, int); //Line 4 . . . private: int u; double v 

Development process Questions

c++
c++  .write a prgrm tht accepts 5 subjects of a student,it shld hv a function to calculate the average & another function to grade.grade shld be as follows-<40=E,40-49=D,50-59=C,60-69=B & >70 

UML Questions

c++
c++  Write the definition of the class dayType that implements the day of the week in a program. The class dayType should store the day... on an object of type dayType: a. Set the day. b. Print the day. c. Return the day 

Development process Questions

c++
c++  write a programme that calculates the area and circumference of a rectangle   #include<conio.h> #include<iostream.h> class rect { int l,b; int area; int peri; public: void get_rect() { cout<<"\n 

Java Beginners

c++
c++   Assume vector "x" of integers with values of 7, 3, 5, 8, 1, 9, 0, 4, 2, 6. Second, assume integer variables "a," "b" and "y" with values of 3, x.size()-5 and 0, respectively. Third, assume a for-loop header which: 3.1 

Java Beginners

to all Experts.. please help me. im using a Jcreator. - Java Beginners
to all Experts.. please help me. im using a Jcreator.  3. Write a program that asks the user to enter a word. The program will then repeat word for as many times as it has characters: Enter a word: ILOVEU ILOVEU 

Development process Questions

C,C++
C,C++  Sir, 100&30 gives output 4 in C++ and 100|30 gives output 116 How & and | gives output 4 and 116 

Development process Questions

C,C++
C,C++  int i=100,j=20; int c=i&j; int r=i|j; printf("%d",c); printf("%d",r);   #include<stdio.h> #include<conio.h> void main(){ int i=100,j=20; int c=i&j; int r=i|j; printf("%d",c); printf("%d",r 

WebSevices Questions

programming questions
programming questions  this is my assignment questions please help me... the programs in c# language Describe the following with respect... concepts. Write a program in C# language to perform the following operations: a. Basic 

Programming Questions

Software Questions and Answers
Software Questions and Answers View Software Questions and Answers online Discuss Software development questions, ask your questions and get answers online. Here you can find questions asked by developers in the past. You can 

Programming Questions

Software Questions and Answers
://www.roseindia.net/answers/askquestions/askquestion.html View latest Questions...Software Questions and Answers       View Software Questions and Answers online Discuss Software 

Java Interview Questions

Plz give the answers - Java Interview Questions
=a; for (int i=1;i<=a-1;i++) { b=a%i; // im not sure if its b= n%i or b=i%n i cant remember which is the right one if(b==0) { c=c+i 

Development process Questions

c/c++ - Development process
c/c++  Creating animation using c/c++. The code for moving an object using c/c 

Programming Questions

Questions and Answers Help
Questions and Answers Help      ... features of the questions posting form You can ask questions in and provide...-example.html Ask Questions | Browse Latest Questions and Answers 

Programming Questions

Questions and Answers Help
Questions and Answers Help      ... features of the questions posting form You can ask questions in and provide...-example.html Ask Questions | Browse Latest Questions and Answers 

Java Beginners

variable declaration in c and c++
variable declaration in c and c++  Comparison and an example of variable declaration in C and C 

Development process Questions

c/c++ - Development process
c/c++  I need the code for developping two dice and roll them using c/c++. Thanks 

OpenSourceSoftware

Open Source c++
++ implementation of much of this code. As much as possible, I've stuck with ANSI C. Most...Open Source c++ Open Source C++ During our professional... for their drivers. Many industrial IO products are shipped with C (sometimes Visual Basic 

Java Beginners

Java Questions
[] urls = null; URL url = new URL("jar:file::///c://myjarfile.jar!/"); urls = new URL 

Development process Questions

c/c++ - Development process
c/c++  Ive been asked to develop a backgammon game using C language. I don't know which code to use to move checkers and to roll die. I would appreciate to get some help. Thanks 

Development process Questions

c/c++ - Development process
c/c++  Ive been asked to develop a backgammon game using C language. I don't know which code to use to move checkers and to roll die. I would appreciate to get some help. Thanks 

Java Beginners

c c++ - Java Beginners
c c++  Write a Multi-user chat server and client  Hi Friend, Please visit the following link: http://www.roseindia.net/chatserver/index.shtml Hope that it will be helpful for you. Thanks 

Java Beginners

c or c++ - Java Beginners
c or c++  Write a program for a two user chess game(Users must be on different systems)? please send me this source code to my mail id with step by step explanation 

Java Interview Questions

java - Java Interview Questions
Why Java  Why Java? why not C or C 

Java Interview Questions

Java interview questions
Java interview questions  Plz answer the following questions... - 1 b. -231 to 231 - 1 c. -264 to 264 d. -232 to 232 - 1 Which of the following is not a hexadecimal number? (A) 999 (B) (hex)23 (C) 0x556 (D) 0x1F2 

Java Beginners

c c++ - Java Beginners
c c++  Write a small record management application for a school...]; String name = f[1]; String c = f[2]; String note = f[3...]; String name = st[1]; String c = st[2]; String note = st[3]; if (id.equals 

Programming Tutorials

Java Questions & Java FAQ
Java Questions & Java FAQ  ... have listed the Java Questions which are commonly asked. Our collection of frequently asked questions (FAQ) will provide you brief answers to many common 

Swing AWT

c c++ - Swing AWT
c c++  Write Snake Game using Swings  Hi Friend, Try the following code: 1)SnakeGame.java: import javax.swing.JFrame; public class SnakeGame extends JFrame { public SnakeGame() { add(new Snake 

Java Beginners

C# question
C# question  In C#, string is a class or primitive type. Explain 

Java Beginners

C# question
C# question  Explain enumeration base types in C 

XML Questions

Difference in XML, C, C++, Java
Difference in XML, C, C++, Java  hi... What is the difference between XML and C or C++ or Java ? please tell me about that Thanks 

General

Ask Questions with Options
Ask Questions with Options using Java In this section, we are going to ask five questions one after the other with four options to test the user. For this, we have stored 5 questions, answers with four options into a list. The list 

IDE Questions

Linux - IDE Questions
Linux notes  Hi, Could u plez send a material & online notes ,which is good start for a new users to linux environment. Could u clear doubts on C/C++ language ? Reply ASAP 

Design concepts & design patterns Questions

c programming
c programming  how can i get the ouput in the format of a a b a b c 

Design concepts & design patterns Questions

c programming
c programming  how can i get the ouput in the format of a a b a b c 

Design concepts & design patterns Questions

c programming
c programming  how can i get the ouput in the format of a a b a b c 

Applet Questions

c programming
c programming  write a program to input five numbers by using while loop in c programing 

Java Interview Questions

c question
c question  How to convert decimal numbers into binary digits without using pow function in c language 

Java Beginners

C# question
C# question  Write a program in C# to create 3*4 matrix and show the sum of diagonal values 

Java Beginners

C# question
C# question  How can we call method pass by reference in C 

Java Beginners

C# question
C# question  Write a program in C# to create 3*4 matrix and show the sum of diagonal values 

JDBC Questions

c++ - JDBC
c++  Can any one given a note on advantages and disadvantages of C 

Java Interview Questions

code - Java Interview Questions
code  Will you please tell me the JNI code for shut down button that the code in java from c 

Java Interview Questions

java - Java Interview Questions
java  After the declaration: char[] c = new char[100]; what is the value of c[50]? a) 50 b) 49 c) '\u0000' d) '\u0020' e) " " f) cannot... the declaration: int x; the range of x is: a) -231 to 231-1 b) -216 to 216 - 1 c) -232 

Design concepts & design patterns Questions

C++ programing
C++ programing  how to change constants to be randomly generated 

Java Beginners

C/C++/JAVA Question on function
C/C++/JAVA Question on function  "Write a function to find out common... other data type also.â?? Question can be solved in C,C++ or JAVA. (Recommneded - C 

Advertisements Advertisements
 

 

 

DMCA.com