A) constructors should have the same name as class nameb) constructors have to be public so that class can be instantiatedc) constructors can not be overloadedexplanation: constructors can be overloaded with different parameters
A) topdownb) bottomupc) none
Hi All, I have written the below program to find the substring in the string. in case one word coming multiple time how to handle this situation ? the below program retuning -1 as position which is wrong.
How to fixi it ?
- Input ("abhijit" , "jit")
- public int FindSubString(string strSuper, string strSub)
- char charSuper = strSuper.ToCharArray();
- char charSub = strSub.ToCharArray();
- //int position = -1;
- for (int i = 0; i <= charSuper.Length - charSub.Length; i++)
- int counter = 0;
- for (int J = 0; J < charSub.Length; J++)
- if (charSuper[i] != charSub[J])
- if (counter == charSub.Length)
- position = i - charSub.Length;
- return position;
A) interface definitions does not have implementationb) interfaces must be declared as publicc) interfaces can be instantiatedd) interface does not have constructorsexplanation: interfaces can only be implemented by inheriting and they can not be instantiated
A) trueb) false
Wap on 3d matrix by using random function print in a file. find the prime numbers from out put of above program. find the even numbers from o/p of 1st program. find the odd numbers from o/p of 1st program.
Program on 3d matrix using random function print the o/p in file find the even,odd,prime numbers from above output file. please do needful help thank you