Complete IIT AIEEE ICSE ISC PMT help forum
This is a free help Forum for Indian Students.
Complete IIT AIEEE ICSE ISC PMT help forum
This is a free help Forum for Indian Students.
Complete IIT AIEEE ICSE ISC PMT help forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Complete IIT AIEEE ICSE ISC PMT help forum

Complete help forum for students preparing for icse iit aieee cbse pmt and other related exams.Stay updated about all 2011 exams.
 
HomeHome  PortalPortal  SearchSearch  Latest imagesLatest images  RegisterRegister  Log in  India NewsIndia News  
Keywords
RESULT physics papers SELECT 2006 YEAR graph CASE 2009 2004 2010 question 2007 prelim CLASS science UNION paper computer ICSE
Latest topics
» Nitration of aniline - IIT JEE 2018 Advanced - solved
Doubts EmptyFri Jun 08, 2018 2:34 am by adianadiadi

» Diamagnetic - Paramagnetic - Ni(CO)4, [Ni(CN)4]2- and [NiCl4
Doubts EmptyFri Apr 06, 2018 1:05 am by adianadiadi

» IIT JEE chemistry solved interactive question paper
Doubts EmptySun Oct 29, 2017 12:11 pm by adianadiadi

» IIT JEE 2015 SOLVED QUESTION PAPER
Doubts EmptyWed Oct 19, 2016 1:44 pm by adianadiadi

» IIT JEE chemistry solved questions
Doubts EmptySat Jul 18, 2015 6:15 pm by adianadiadi

» General Description of Chinese Market for Foaming Agent ADC
Doubts EmptyFri May 09, 2014 2:09 pm by happybaicaitou

» How to get Lowest Cost MBBS Admission?
Doubts EmptyMon Feb 24, 2014 6:39 pm by MENTOR 2014

»  girl boy vashikaran specialist agori baba ji +91-9461165
Doubts EmptyTue Jan 21, 2014 6:00 pm by krshastri

»  STRONG LOST LOVE SPELL +91-9461165176
Doubts EmptyTue Jan 21, 2014 6:00 pm by krshastri

Top posters
abhas
Doubts Vote_lcapDoubts Voting_barDoubts Vote_rcap 
Anu..i luv icse...:)
Doubts Vote_lcapDoubts Voting_barDoubts Vote_rcap 
G-7
Doubts Vote_lcapDoubts Voting_barDoubts Vote_rcap 
siya
Doubts Vote_lcapDoubts Voting_barDoubts Vote_rcap 
Candy
Doubts Vote_lcapDoubts Voting_barDoubts Vote_rcap 
jOhNy
Doubts Vote_lcapDoubts Voting_barDoubts Vote_rcap 
Apurva
Doubts Vote_lcapDoubts Voting_barDoubts Vote_rcap 
WinRrule
Doubts Vote_lcapDoubts Voting_barDoubts Vote_rcap 
ambili
Doubts Vote_lcapDoubts Voting_barDoubts Vote_rcap 
saif
Doubts Vote_lcapDoubts Voting_barDoubts Vote_rcap 



Search if you can't find it here

Doubts

View previous topic View next topic Go down
AuthorMessage
Pratishtha




Doubts Vide
PostSubject: Doubts Doubts EmptyThu Jan 31, 2008 1:53 pm

Question 1



A. Write a program to input two strings consist of maximum 80 characters. Examine both the strings and remove all the common characters from both of these strings. Display the resultant string.



B. Write a function to suppress negative elements of an array to bottom without altering

the original sequence i.e. if array contains 5 , -4 , 3 , -2 , 6 , -11 , 12 , -8 , 9

Then the return array will be : 5 , 3 , 6, 12 , 9 , -4 , -2 , -11 , -8







Question 2 Shocked



A. What are input and output streams? What is the significance of DataOutputStream class.

B. Describe the various classes available for character oriented file operation.



Back to top Go down
abhas
Active member
Active member
abhas


Doubts Vide
PostSubject: JAVA icse class x bluej Doubts EmptyThu Jan 31, 2008 3:25 pm

ans.1(a)

//Write a program to input two strings consist of maximum 80 characters. Examine both the strings and remove all the common characters from both of these strings. Display the resultant string.


class srt
{
void main(String a,String b)
{

if(a.length()>80 || b.length() > 80)
{
System.out.println("Program will exit as length of String is greater than 80 characters");
System.out.println("NOTE:Space is also counted as Single character");
System.exit(0);
}


int y=0;
String x="";
int A=a.length();
for (int c=0;c


Last edited by on Fri Feb 01, 2008 3:10 pm; edited 1 time in total
Back to top Go down
abhas
Active member
Active member
abhas


Doubts Vide
PostSubject: Re: Doubts Doubts EmptyThu Jan 31, 2008 3:34 pm

ans 2(a)
inputstrems areused to take input through standard input device (keyboard) and outputstreams are used to display output on standard output device(monitor)

DataOutputStream is a class derived from FilterOutputStream class that allows you to write binary represented data of Java primitive data types reading from an underlying output stream in a machine-independent way. [It is used to perform output]
Back to top Go down
abhas
Active member
Active member
abhas


Doubts Vide
PostSubject: Re: Doubts Doubts EmptyThu Jan 31, 2008 3:36 pm

i think ques 2(b) is not in course

if u know the ans then plz. explain .... Question
Back to top Go down
abhas
Active member
Active member
abhas


Doubts Vide
PostSubject: ICSE JAVA PROGRAMS Doubts EmptyThu Jan 31, 2008 4:00 pm

ans1(b)
//i tried and made this but it is changing seq. of negative nos.
//I think to do that we must know the no. of negative nos.
//Dont worry i'll try it once again properly tonight
//And may be give u the correct ans. tomorrow
//Bye....
//Yes i must say all ur ques. were really cool !!!!!! Exclamation
//Now i must sleep for atleast 1 hr Sleep as i m really tired

class arrange
{
void main(int arr[])
{

int l=arr.length;
int x=l-1;//arr.length-1
int y=0;
int b[]=new int[l];
int c;
System.out.println("ORIGINAL");
for(c=0;c<l;c++)
System.out.println(arr[c]);

System.out.println(" ");

for (int a=0;a<l;a++)
{
if(arr[a]<0)
{
b[x]=arr[a];
x--;
}
else
{
b[y]=arr[a];
y++;
}
}
System.out.println("new value to be returned");
for(c=0;c<l;c++)
System.out.println(b[c]);

}
}
Back to top Go down
abhas
Active member
Active member
abhas


Doubts Vide
PostSubject: Re: Doubts Doubts EmptyFri Feb 01, 2008 3:12 pm

//yes i did that one as well
//it was very very easy

class sort
{
void main(int arr[])
{
int l=arr.length;
int b[]=new int[l];
int a[]=new int[l];

int x,z=0,y=0;

System.out.println("array :");
for(x=0;x<l;x++)
System.out.println(arr[x]);
System.out.println("");

for(x=0;x<l;x++)
{
if(arr[x]<0)
{
b[y]=arr[x];
y++;
}
else
{
a[z]=arr[x];
z++;
}
}
for(x=0;x<z;x++)
arr[x]=a[x];

int d=0;
for(x=z;x<l;x++)
{arr[x]=b[d];d++;}

System.out.println("New array to be returned");
for(x=0;x<l;x++)
System.out.println(arr[x]);
}
}
Back to top Go down
Sponsored content




Doubts Vide
PostSubject: Re: Doubts Doubts Empty

Back to top Go down

Doubts

View previous topic View next topic Back to top
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Complete IIT AIEEE ICSE ISC PMT help forum :: Computer :: Computer help forum-