Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Spring Framework | Web Services | BioInformatics | Java Server Faces | Jboss 3.0 tutorial | Hibernate 3.0 | XML

Tutorial Categories: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML


Java Tutorials



Struts Tutorials

Struts Resources

Visit Forum! Post Questions!
Jobs At RoseIndia.net!

Askquestions C Questions

User Comments
Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl
  Blink   Furl   Simpy   Y! MyWeb 

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

19 comments so far (post your own) View All Comments Latest 10 Comments:

Can we declare a variable in switch statement before any case starts.
like as shown below,
int b=20;
case 1: printf("b is %d\n",b); break;

Posted by ashish on Saturday, 10.9.10 @ 13:09pm | #100151

C++ function declarations:

1) isEmptyList():boolean {query} - determines whether a list is empty

2) getLengthList():integer {query} - returns the number of items in a list

3) insertList(in ndx:integer,
in newItem:ListItemType,
out success:boolean )
- inserts an item (newItem) at a given position (ndx) in the list. The success flag should indicate whether the insertion was successful.

4) removeItemList(in index:integer,
out success:boolean)
- deletes the item at a given position (index)in the list.
The success flag should indicate whether the insertion was successful.

5) retrieveItemList(in index:integer,
out dataItem:ListItemType,
out success:boolean) {query}
- copies the item at a given position (index) in the list as dataItem. The success flag should indicate whether the insertion was successful

6) compareList(in firstItem:ListItemType,in nxtItem:ListItemType): integer
- compares the 2 list-items;
returns -1 if (firstItem is less than nxtItem)
returns 0 if (firstItem is equal to nxtItem)
returns 1 if (firstItem is more than nxtItem)

C++ function definitions using the operations declared above:
7) replaceItemList(in myList: List,
in oldItem: ListItemType,
in nuItem: ListItemType,
out succ: boolean)
- replaces oldItem in the list with a new item (nuItem). The succ flag should indicate whether the replacement was successful.

8) maxList(in byList: List,
out flag: boolean): ListItemType
- returns the highest value in a list. The flag should indicate whether the operation was successful.

9) isUniqueList(in urList: List): boolean
- determines if the list contains unique items with no duplicates.

10) retrieveItemPostList(in aList: List,
in dataItem: ListItemType,
out ndex: integer,
out succss: boolean) {query}
- returns the ordinal position (ndex) in the list of item dataItem. The succss flag should indicate whether the insertion was successful.

Posted by beejay on Friday, 10.1.10 @ 02:53am | #99979

iam using windows7 in that i use dosbox for fullscreen there i entered a program i am getting all prototype errors. ie;printf ,scanf ,getch should have proyotype error is coming........please help

Posted by jayanth on Saturday, 08.21.10 @ 22:42pm | #99083

write a c program of ATM machine

Posted by asadullah on Monday, 05.31.10 @ 09:55am | #97284

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..
DDDX34 or
and for me could you explain why this is?

thanks everyone!

Posted by derrick on Wednesday, 05.5.10 @ 21:39pm | #96844

WAP to implement transformations using c

Posted by prachi on Wednesday, 04.7.10 @ 13:03pm | #96173



Posted by ranjeet on Saturday, 02.27.10 @ 16:35pm | #95166

write a step by step program using c++ console.
question: write a program to find the average of ten even numbers

Posted by Lloyd A on Tuesday, 02.23.10 @ 23:55pm | #95083

sir when we gave size of operator with integer ponter ,char pointer ,float pointer
in a 16 bit processor it gave the ouyput as 2 .what will be the output when we use 32 bit procesor.does it depend on operating system

Posted by jeyshree on Thursday, 02.11.10 @ 10:37am | #94761

hello sir...plz help me...
the size of int*,char*,float* is 4 bytes in case of 16 bit proscessor.why it should be so??and does it depends on OS??
for eg in case of 32 bit processor how it will be??? plz clrify the doubt

Posted by ramya on Thursday, 02.11.10 @ 10:24am | #94760

how we can count the number of repeted word in a string

Posted by Aruna Saraf on Wednesday, 02.3.10 @ 21:54pm | #94562

int do_openFile(void)
char *p ; /* pointer to outFileName */
char *m ; /* pointer to report date */
char *mon; /* month number in report date */

/* get output file name */
m = pk->CNCRptdate;
m += 2;
strncpy(mon, m, 2);

p = outFileName ;

strcpy(p, pi->CNDExtransit);
p += 5;
strcpy(p, monTab[atoi(mon)]);
p += 3;
strcpy(p, ".");
p += 1;
strcpy(p, "TXT");

/* Open a new file for writing, if file exists, its contents are destroyed
if ((outfile = fopen(outFileName, "w")) == NULL)
printf (" \r");
printf ("fopen failed\n");
printf ("Please hit 'PRINT SCREEN' and then hit ENTER to abort...\n");
return (0);

Issue: When the control hits the first strncpy() function, it throws "Unhandled exception at 0x00401acd in ICRSEX2B.exe: 0xC0000005: Access violation writing location 0x0040258f."

Pls let me know if any other information is required.

Posted by Sadheesh on Monday, 02.1.10 @ 15:46pm | #94494

how to Convert the time entered by the user in the form of day, hours and minute to minutes.

1 day = 24 hours
1 hour = 60 minutes

in to output and input???

Posted by afindy kadir on Saturday, 01.30.10 @ 22:22pm | #94463

c++ program to assign different values to different categories of students using overloading of constructors

Posted by F.Anselm on Saturday, 01.2.10 @ 02:55am | #93738

After running a program in C++ 2008 Express Edition it said error: 'length' undeclared indentifier. What does that mean?

Posted by cj on Wednesday, 12.30.09 @ 04:48am | #93684

Write a program that takes two integers L and H (i.e. lowest and
highest integer), and calls a function CalculateSum that computes the
sum of all the numbers between L and H. Finally, the program will
print the average of all these integer numbers by dividing the sum by
the number of integers between L and H. The program should assert if
L is less than or equal to H.

Posted by sahar ramadan on Friday, 12.4.09 @ 01:23am | #93062

Im basically tryin to make a program that reads information about ships, where each ship can have information of several weapons read.

struct Ship
int speed;
int space;
int numW;
struct Weapon
char type [num];
int speed;
int space;

what would be the code to like cin>> weapon info
if for example we got array of boats: Ship x[n];
n--> number of ships to be read.

I tried using x[].y[].type;
but it didnt work, plz help

Posted by Raef on Tuesday, 11.24.09 @ 06:11am | #92811

in Turbo C (C++ actually),how to include use the function calls from timer.h for getting the date/day/month/year like that?
grateful to hear reply...

Posted by srikantankc on Thursday, 11.19.09 @ 15:52pm | #92706

write a program to display multiplication tableof any no using do-while loop

Posted by dinesh.patel on Monday, 11.16.09 @ 21:05pm | #92622

Ask programming questions?



Back to Tutorial


  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification

Tell A Friend
Your Friend Name


Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2007. All rights reserved.