· What are different types of caching using cache object of ASP.NET?
· How can you cache different version of same page using ASP.NET cache object?
· How will implement Page Fragment Caching?
· Can you compare classic ASP with ASP.NET sessions ?
· Which different modes of storing ASP.NET session?
· What’s the difference between Cache object and application object?
· How can get access to cache object?
· What are dependencies in cache and types of dependencies?
· Can you show a simple code showing file dependency in cache?
· What is Cache Callback in Cache?
· What is scavenging?
· Is Session_End event supported in all session modes?
· What are the precautions you will take in order that StateServer Mode work properly?
· What are the precautions you will take in order that SQLSERVER Mode work properly?
· Does the performance for viewstate vary according to User controls?
· What are benefits and Limitation of using Viewstate for state management?
· How can you use Hidden frames to cache client data?
· What are benefits and limitations of using Hidden frames?
· What are benefits and limitations of using Cookies?
· Where do you specify session state mode in ASP.NET?
· What are the other ways you can maintain state?
· What are benefits and Limitation of using Hidden fields?
· Explain ViewState?
· What is Query String and what are benefits and limitations of using Query Strings?
Collection and sharing of, interview questions and answers asked in various interviews, faqs and articles.....
Windows 2000 Interview Question
1. Explain hidden shares.
2. How do the permissions work in Windows 2000? What permissions does folder inherit from the parent?
3. Why can’t I encrypt a compressed file on Windows 2000?
4. If I rename an account, what must I do to make sure the renamed account has the same permissions as the original one?
5. What’s the most powerful group on a Windows system?
6. What are the accessibility features in Windows 2000?
7. Why can’t I get to the Fax Service Management console?
8. How do you convert a drive from FAT/FAT32 to NTFS from the command line?
9. Explain APIPA. Auto Private IP Addressing (APIPA
10. How does Internet Connection Sharing work on Windows 2000?
11. What do I need to ensure before deploying an application via a Group Policy?
12. How do you configure mandatory profiles
13. What’s a maximum number of processors Win2k supports? 2
14. I had some NTFS volumes under my Windows NT installation. What happened to NTFS after Win 2k installation?
2. How do the permissions work in Windows 2000? What permissions does folder inherit from the parent?
3. Why can’t I encrypt a compressed file on Windows 2000?
4. If I rename an account, what must I do to make sure the renamed account has the same permissions as the original one?
5. What’s the most powerful group on a Windows system?
6. What are the accessibility features in Windows 2000?
7. Why can’t I get to the Fax Service Management console?
8. How do you convert a drive from FAT/FAT32 to NTFS from the command line?
9. Explain APIPA. Auto Private IP Addressing (APIPA
10. How does Internet Connection Sharing work on Windows 2000?
11. What do I need to ensure before deploying an application via a Group Policy?
12. How do you configure mandatory profiles
13. What’s a maximum number of processors Win2k supports? 2
14. I had some NTFS volumes under my Windows NT installation. What happened to NTFS after Win 2k installation?
JavaScript Objective Interview Question With Answer
1. What should appear at the very end of your JavaScript?
The script LANGUAGE="JavaScript" tag
2. Which of the following can't be done with client-side JavaScript?
3. Which of the following are capabilities of functions in JavaScript?
4. Why so JavaScript and Java have similar name?
5. When a user views a page containing a JavaScript program, which machine actually 6. ______ JavaScript is also called client-side JavaScript.
7. __________ JavaScript is also called server-side JavaScript.
8. What are variables used for in JavaScript Programs?
9. _____ JavaScript statements embedded in an HTML page can respond to user events 10. Which of the following is not a valid JavaScript variable name?
11. ______ tag is an extension to HTML that can enclose any number of JavaScript 12. How does JavaScript store dates in a date object?
13. Which of the following attribute can hold the JavaScript version?
14. What is the correct JavaScript syntax to write "Hello World"?
15. Which of the following way can be used to indicate the LANGUAGE attribute?
16. Inside which HTML element do we put the JavaScript?
17. What is the correct syntax for referring to an external script called " abc.js"?
18. Which types of image maps can be used with JavaScript?
20. Which is the correct way to write a JavaScript array?
21. What does the noscript tag do?
22. If para1 is the DOM object for a paragraph, what is the correct syntax to change the text within the paragraph?
23. JavaScript entities start with _______ and end with _________.
24. Which of the following best describes JavaScript?
25. Choose the server-side JavaScript object?
26. Choose the client-side JavaScript object?
27. Which of the following is not considered a JavaScript operator?
28. ______method evaluates a string of JavaScript code in the context of the specified object.
29. Which of the following event fires when the form element loses the focus: 30. The syntax of Eval is ________________
31. JavaScript is interpreted by _________
32. Using _______ statement is how you test for a specific condition.
33. Which of the following is the structure of an if statement?
34. How to create a Date object in JavaScript?
35. The _______ method of an Array object adds and/or removes elements from an array.
36. To set up the window to capture all Click events, we use which of the following statement?
37. Which tag(s) can handle mouse events in Netscape?
38. ____________ is the tainted property of a window object.
39. To enable data tainting, the end user sets the _________ environment variable.
40. In JavaScript, _________ is an object of the target language data type that encloses an object of the source language.
41. When a JavaScript object is sent to Java, the runtime engine creates a Java wrapper of type ___________
42. _______ class provides an interface for invoking JavaScript methods and examining JavaScript properties.
43. _________ is a wrapped Java array, accessed from within JavaScript code.
44. A ________ object is a reference to one of the classes in a Java package, such as netscape.javascript .
45. The JavaScript exception is available to the Java code as an instance of __________
46. The syntax of a blur method in a button object is ______________
47. The syntax of capture events method for document object is ______________
58. The syntax of close method for document object is ______________
The script LANGUAGE="JavaScript" tag
2. Which of the following can't be done with client-side JavaScript?
3. Which of the following are capabilities of functions in JavaScript?
4. Why so JavaScript and Java have similar name?
5. When a user views a page containing a JavaScript program, which machine actually 6. ______ JavaScript is also called client-side JavaScript.
7. __________ JavaScript is also called server-side JavaScript.
8. What are variables used for in JavaScript Programs?
9. _____ JavaScript statements embedded in an HTML page can respond to user events 10. Which of the following is not a valid JavaScript variable name?
11. ______ tag is an extension to HTML that can enclose any number of JavaScript 12. How does JavaScript store dates in a date object?
13. Which of the following attribute can hold the JavaScript version?
14. What is the correct JavaScript syntax to write "Hello World"?
15. Which of the following way can be used to indicate the LANGUAGE attribute?
16. Inside which HTML element do we put the JavaScript?
17. What is the correct syntax for referring to an external script called " abc.js"?
18. Which types of image maps can be used with JavaScript?
20. Which is the correct way to write a JavaScript array?
21. What does the noscript tag do?
22. If para1 is the DOM object for a paragraph, what is the correct syntax to change the text within the paragraph?
23. JavaScript entities start with _______ and end with _________.
24. Which of the following best describes JavaScript?
25. Choose the server-side JavaScript object?
26. Choose the client-side JavaScript object?
27. Which of the following is not considered a JavaScript operator?
28. ______method evaluates a string of JavaScript code in the context of the specified object.
29. Which of the following event fires when the form element loses the focus: 30. The syntax of Eval is ________________
31. JavaScript is interpreted by _________
32. Using _______ statement is how you test for a specific condition.
33. Which of the following is the structure of an if statement?
34. How to create a Date object in JavaScript?
35. The _______ method of an Array object adds and/or removes elements from an array.
36. To set up the window to capture all Click events, we use which of the following statement?
37. Which tag(s) can handle mouse events in Netscape?
38. ____________ is the tainted property of a window object.
39. To enable data tainting, the end user sets the _________ environment variable.
40. In JavaScript, _________ is an object of the target language data type that encloses an object of the source language.
41. When a JavaScript object is sent to Java, the runtime engine creates a Java wrapper of type ___________
42. _______ class provides an interface for invoking JavaScript methods and examining JavaScript properties.
43. _________ is a wrapped Java array, accessed from within JavaScript code.
44. A ________ object is a reference to one of the classes in a Java package, such as netscape.javascript .
45. The JavaScript exception is available to the Java code as an instance of __________
46. The syntax of a blur method in a button object is ______________
47. The syntax of capture events method for document object is ______________
58. The syntax of close method for document object is ______________
SAP R/3
Can you create a table with fields not referring to data elements?
YES. eg:- ITAB LIKE SPFLI.here we are referening to a data object(SPFLI) not data element.
What are the different types of data dictionary objects? tables, structures, views, domains, data elements, lock objects, Match code objects.
What should be the approach for writing a BDC program?
STEP 1: CONVERTING THE LEGACY SYSTEM DATA TO A FLAT FILE to internal table CALLED "CONVERSION".
STEP 2: TRANSFERING THE FLAT FILE INTO SAP SYSTEM CALLED "SAP DATA TRANSFER".
STEP 3: DEPENDING UPON THE BDC TYPE
i)call transaction(Write the program explicity)
ii) create sessions (sessions are created and processed.if success data will transfer).
What are the problems in processing batch input sessions and How is batch input process different from processing online?
PROBLEMS:
i) If the user forgets to opt for keep session then the session will be automatically removed from the session queue(log remains). However if session is processed we may delete it manually.
ii)if session processing fails data will not be transferred to SAP database table.
What does an extract statement do in the ABAP program?
Once you have declared the possible record types as field groups and defined their structure, you can fill the extract dataset using the following statements: EXTRACT. When the first EXTRACT statement occurs in a program, the system creates the extract dataset and adds the first extract record to it. In each subsequent EXTRACT statement, the new extract record is added to the dataset EXTRACT HEADER. When you extract the data, the record is filled with the current values of the corresponding fields. As soon as the system has processed the first EXTRACT statement for a field group , the structure of the corresponding extract record in the extract dataset is fixed. You can no longer insert new fields into the field groups and HEADER. If you try to modify one of the field groups afterwards and use it in another EXTRACT statement, a runtime error occurs. By processing EXTRACT statements several times using different field groups, you fill the extract dataset with records of different length and structure. Since you can modify field groups dynamically up to their first usage in an EXTRACT statement, extract datasets provide the advantage that you need not determine the structure at the beginning of the program.
Can a transparent table exist in data dictionary but not in the data base physically?
NO. TRANSPARENT TABLE DO EXIST WITH THE SAME STRUCTURE BOTH IN THE DICTIONARY AS WELL AS IN THE DATABASE,EXACTLY WITH THE SAME DATA AND FIELDS.
What is the step by step process to create a table in data dictionary?
step 1: creating domains(data type, field length, range).
step 2: creating data elements(properties and type for a table field).
step 3: creating tables(SE11).
What is the typical structure of an ABAP/4 program?
HEADER ,BODY,FOOTER.
A situation: An ABAP program creates a batch input session. We need to submit the program and the batch session in back ground. How to do it?
go to SM36 and create background job by giving job name, job class and job steps (JOB SCHEDULING)
What are the domains and data elements?
DOMAINS : FORMAL DEFINITION OF THE DATA TYPES.THEY SET ATTRIBUTES SUCH AS DATA TYPE,LENGTH,RANGE.
DATA ELEMENT : A FIELD IN R/3 SYSTEM IS A DATA ELEMENT.
What is the alternative to batch input session?
Call transaction.
What is a batch input session?
BATCH INPUT SESSION is an intermediate step between internal table and database table. Data along with the action is stored in session ie data for screen fields, to which screen it is passed, program name behind it, and how next screen is processed.
What is the advantage of structures? How do you use them in the ABAP programs?
Adv:- GLOBAL EXISTANCE(these could be used by any other program without creating it again).
YES. eg:- ITAB LIKE SPFLI.here we are referening to a data object(SPFLI) not data element.
What are the different types of data dictionary objects? tables, structures, views, domains, data elements, lock objects, Match code objects.
What should be the approach for writing a BDC program?
STEP 1: CONVERTING THE LEGACY SYSTEM DATA TO A FLAT FILE to internal table CALLED "CONVERSION".
STEP 2: TRANSFERING THE FLAT FILE INTO SAP SYSTEM CALLED "SAP DATA TRANSFER".
STEP 3: DEPENDING UPON THE BDC TYPE
i)call transaction(Write the program explicity)
ii) create sessions (sessions are created and processed.if success data will transfer).
What are the problems in processing batch input sessions and How is batch input process different from processing online?
PROBLEMS:
i) If the user forgets to opt for keep session then the session will be automatically removed from the session queue(log remains). However if session is processed we may delete it manually.
ii)if session processing fails data will not be transferred to SAP database table.
What does an extract statement do in the ABAP program?
Once you have declared the possible record types as field groups and defined their structure, you can fill the extract dataset using the following statements: EXTRACT. When the first EXTRACT statement occurs in a program, the system creates the extract dataset and adds the first extract record to it. In each subsequent EXTRACT statement, the new extract record is added to the dataset EXTRACT HEADER. When you extract the data, the record is filled with the current values of the corresponding fields. As soon as the system has processed the first EXTRACT statement for a field group , the structure of the corresponding extract record in the extract dataset is fixed. You can no longer insert new fields into the field groups and HEADER. If you try to modify one of the field groups afterwards and use it in another EXTRACT statement, a runtime error occurs. By processing EXTRACT statements several times using different field groups, you fill the extract dataset with records of different length and structure. Since you can modify field groups dynamically up to their first usage in an EXTRACT statement, extract datasets provide the advantage that you need not determine the structure at the beginning of the program.
Can a transparent table exist in data dictionary but not in the data base physically?
NO. TRANSPARENT TABLE DO EXIST WITH THE SAME STRUCTURE BOTH IN THE DICTIONARY AS WELL AS IN THE DATABASE,EXACTLY WITH THE SAME DATA AND FIELDS.
What is the step by step process to create a table in data dictionary?
step 1: creating domains(data type, field length, range).
step 2: creating data elements(properties and type for a table field).
step 3: creating tables(SE11).
What is the typical structure of an ABAP/4 program?
HEADER ,BODY,FOOTER.
A situation: An ABAP program creates a batch input session. We need to submit the program and the batch session in back ground. How to do it?
go to SM36 and create background job by giving job name, job class and job steps (JOB SCHEDULING)
What are the domains and data elements?
DOMAINS : FORMAL DEFINITION OF THE DATA TYPES.THEY SET ATTRIBUTES SUCH AS DATA TYPE,LENGTH,RANGE.
DATA ELEMENT : A FIELD IN R/3 SYSTEM IS A DATA ELEMENT.
What is the alternative to batch input session?
Call transaction.
What is a batch input session?
BATCH INPUT SESSION is an intermediate step between internal table and database table. Data along with the action is stored in session ie data for screen fields, to which screen it is passed, program name behind it, and how next screen is processed.
What is the advantage of structures? How do you use them in the ABAP programs?
Adv:- GLOBAL EXISTANCE(these could be used by any other program without creating it again).
Puzzles For Freshers [1]
Arjan, Bhuvan, Guran and Lakha had 90, 50, 55 and 45 sheep respectively.
Assume that Arjan, Bhuvan, Guran and Lakha had A, B, G and L sheep respectively. As it is given that at the end each would have an equal number of sheep, comparing the final numbers from the above table.
Arjan's sheep = Bhuvan's sheep
2A/3 = A/4 + 3B/4
8A = 3A + 9B
5A = 9B
Arjan's sheep = Guran's sheep
2A/3 = A/15 + B/5 + 4G/5
2A/3 = A/15 + A/9 + 4G/5 (as B=5A/9)
30A = 3A + 5A + 36G
22A = 36G
11A = 18G
Arjan's sheep = Lakha's sheep
2A/3 = A/60 + B/20 + G/5 + L
2A/3 = A/60 + A/36 + 11A/90 + L (as B=5A/9 and G=11A/18)
2A/3 = A/6 + L
A/2 = L
A = 2L
Also, it is given that Guran had ten more sheep than Lakha.
G = L + 10
11A/18 = A/2 + 10
A/9 = 10
A = 90 sheep
Thus, Arjan had 90 sheep, Bhuvan had 5A/9 i.e. 50 sheep, Guran had 11A/18 i.e. 55 sheep and Lakha had A/2 i.e. 45 sheep.
Consider a number 235, where last digit is the sum of first two digits i.e. 2 + 3= 5.
How many
Find the smallest number such that if its rightmost digit is placed at its left end, the new number so formed is precisely 50% larger than the original number.
Answer
The answer is 285714.
If its rightmost digit is placed at its left end, then new number is 428571 which is 50% larger than the original number 285714
The simplest way is to write a small program. And the other way is trial and error !!!
Two identical pack of cards A and B are shuffled throughly. One card is picked from A and shuffled with B. The top card from pack A is turned up. If this is the Queen of Hearts, what are the chances that the top card in B will be the King of Hearts?
Answer 52 / 2703
There are two cases to be considered.
CASE 1 : King of Hearts is drawn from Pack A and shuffled with Pack B
Probability of drawing King of Hearts from Pack A = 1/51 (as Queen of Hearts is not to be drawn)
Probability of having King of Hearts on the top of the Pack B = 2/53
So total probability of case 1 = (1/51) * (2/53) = 2 / (51 * 53)
CASE 2 : King of Hearts is not drawn from Pack A
Probability of not drawing King of Hearts from Pack A = 50/51 (as Queen of Hearts is not to be drawn)
Probability of having King of Hearts on the top of the Pack B = 1/53
So total probability of case 2 = (50/51) * (1/53) = 50 / (51 * 53)
Now adding both the probability, the required probability is
= 2 / (51 * 53) + 50 / (51 * 53)
= 52 / (51 * 53)
= 52 / 2703
= 0.0192378
There is a 4-character code, with 2 of them being letters and the other 2 being numbers.
How many maximum attempts would be necessary to find the correct code? Note that the code is case-sensitive.
Answer
The maximum number of attempts required are 16,22,400
There are 52 possible letters - a to z and A to Z, and 10 possible numbers - 0 to 9. Now, 4 characters - 2 letters and 2 numbers, can be selected in 52*52*10*10 ways. These 4 characters can be arranged in 4C2 i.e. 6 different ways - the number of unique patterns that can be formed by lining up 4 objects of which 2 are distinguished one way (i.e. they must be letters) and the other 2 are distinguished another way (i.e. they must be numbers).
Consider an example : Let's assume that @ represents letter and # represents number. the 6 possible ways of arranging them are : @@##, @#@#, @##@, #@@#, #@#@, ##@@
Hence, the required answer is
= 52*52*10*10*6
= 16,22,400 attempts
= 1.6 million approx.
How many ways are there of arranging the sixteen black or white pieces of a standard international chess set on the first two rows of the board?
Given that each pawn is identical and each rook, knight and bishop is identical to its pair.
Answer 6,48,64,800 ways
There are total 16 pieces which can be arranged on 16 places in 16P16 = 16! ways.
(16! = 16 * 15 * 14 * 13 * 12 * ..... * 3 * 2 * 1)
But, there are some duplicate combinations because of identical pieces.
There are 8 identical pawn, which can be arranged in 8P8 = 8! ways.
Similarly there are 2 identical rooks, 2 identical knights and 2 identical bishops. Each can be arranged in 2P2 = 2! ways.
Hence, the require answer is
= (16!) / (8! * 2! * 2! * 2!)
= 6,48,64,800
******************************************************************
A person with some money spends 1/3 for cloths, 1/5 of the remaining for food and 1/4 of the remaining for travel. He is left with Rs 100/-
How much did he have with him in the begining?
Answer Rs. 250/-
Assume that initially he had Rs. X
He spent 1/3 for cloths =. (1/3) * X
Remaining money = (2/3) * X
He spent 1/5 of remaining money for food = (1/5) * (2/3) * X = (2/15) * X
Remaining money = (2/3) * X - (2/15) * X = (8/15) * X
Again, he spent 1/4 of remaining maoney for travel = (1/4) * (8/15) * X = (2/15) * X
Remaining money = (8/15) * X - (2/15) * X = (6/15) * X
But after spending for travel he is left with Rs. 100/- So
(6/15) * X = 100
X = 250
Grass in lawn grows equally thick and in a uniform rate. It takes 24 days for 70 cows and 60 days for 30 cows to eat the whole of the grass.
How many cows are needed to eat the grass in 96 days?
Answer 20 cows
g - grass at the beginning
r - rate at which grass grows, per day
y - rate at which one cow eats grass, per day
n - no of cows to eat the grass in 96 days
From given data,
g + 24*r = 70 * 24 * y - A
g + 60*r = 30 * 60 * y - B
g + 96*r = n * 96 * y - C
Solving for (B-A),
(60 * r) - (24 * r) = (30 * 60 * y) - (70 * 24 * y)
36 * r = 120 * y - D
Solving for (C-B),
(96 * r) - (60 * r) = (n * 96 * y) - (30 * 60 * y)
36 * r = (n * 96 - 30 * 60) * y
120 * y = (n * 96 - 30 * 60) * y [From D]
120 = (n * 96 - 1800)
n = 20
Hence, 20 cows are needed to eat the grass in 96 days.
There is a safe with a 5 digit number as the key. The 4th digit is 4 greater than the second digit, while the 3rd digit is 3 less than the 2nd digit. The 1st digit is thrice the last digit. There are 3 pairs whose sum is 11.
Find the number.
Answer 65292
As per given conditions, there are three possible combinations for 2nd, 3rd and 4th digits. They are (3, 0, 7) or (4, 1, 8) or (5, 2, 9)
It is given that there are 3 pairs whose sum is 11. All possible pairs are (2, 9), (3, 8), (4, 7), (5, 6). Now required number is 5 digit number and it contains 3 pairs of 11. So it must not be having 0 and 1 in it. Hence, the only possible combination for 2nd, 3rd and 4th digits is (5, 2, 9)
Also, 1st digit is thrice the last digit. The possible combinations are (3, 1), (6, 2) and (9, 3), out of which only (6, 2) with (5, 2, 9) gives 3 pairs of 11. Hence, the
answer is 65292.
Assume that Arjan, Bhuvan, Guran and Lakha had A, B, G and L sheep respectively. As it is given that at the end each would have an equal number of sheep, comparing the final numbers from the above table.
Arjan's sheep = Bhuvan's sheep
2A/3 = A/4 + 3B/4
8A = 3A + 9B
5A = 9B
Arjan's sheep = Guran's sheep
2A/3 = A/15 + B/5 + 4G/5
2A/3 = A/15 + A/9 + 4G/5 (as B=5A/9)
30A = 3A + 5A + 36G
22A = 36G
11A = 18G
Arjan's sheep = Lakha's sheep
2A/3 = A/60 + B/20 + G/5 + L
2A/3 = A/60 + A/36 + 11A/90 + L (as B=5A/9 and G=11A/18)
2A/3 = A/6 + L
A/2 = L
A = 2L
Also, it is given that Guran had ten more sheep than Lakha.
G = L + 10
11A/18 = A/2 + 10
A/9 = 10
A = 90 sheep
Thus, Arjan had 90 sheep, Bhuvan had 5A/9 i.e. 50 sheep, Guran had 11A/18 i.e. 55 sheep and Lakha had A/2 i.e. 45 sheep.
Consider a number 235, where last digit is the sum of first two digits i.e. 2 + 3= 5.
How many
Find the smallest number such that if its rightmost digit is placed at its left end, the new number so formed is precisely 50% larger than the original number.
Answer
The answer is 285714.
If its rightmost digit is placed at its left end, then new number is 428571 which is 50% larger than the original number 285714
The simplest way is to write a small program. And the other way is trial and error !!!
Two identical pack of cards A and B are shuffled throughly. One card is picked from A and shuffled with B. The top card from pack A is turned up. If this is the Queen of Hearts, what are the chances that the top card in B will be the King of Hearts?
Answer 52 / 2703
There are two cases to be considered.
CASE 1 : King of Hearts is drawn from Pack A and shuffled with Pack B
Probability of drawing King of Hearts from Pack A = 1/51 (as Queen of Hearts is not to be drawn)
Probability of having King of Hearts on the top of the Pack B = 2/53
So total probability of case 1 = (1/51) * (2/53) = 2 / (51 * 53)
CASE 2 : King of Hearts is not drawn from Pack A
Probability of not drawing King of Hearts from Pack A = 50/51 (as Queen of Hearts is not to be drawn)
Probability of having King of Hearts on the top of the Pack B = 1/53
So total probability of case 2 = (50/51) * (1/53) = 50 / (51 * 53)
Now adding both the probability, the required probability is
= 2 / (51 * 53) + 50 / (51 * 53)
= 52 / (51 * 53)
= 52 / 2703
= 0.0192378
There is a 4-character code, with 2 of them being letters and the other 2 being numbers.
How many maximum attempts would be necessary to find the correct code? Note that the code is case-sensitive.
Answer
The maximum number of attempts required are 16,22,400
There are 52 possible letters - a to z and A to Z, and 10 possible numbers - 0 to 9. Now, 4 characters - 2 letters and 2 numbers, can be selected in 52*52*10*10 ways. These 4 characters can be arranged in 4C2 i.e. 6 different ways - the number of unique patterns that can be formed by lining up 4 objects of which 2 are distinguished one way (i.e. they must be letters) and the other 2 are distinguished another way (i.e. they must be numbers).
Consider an example : Let's assume that @ represents letter and # represents number. the 6 possible ways of arranging them are : @@##, @#@#, @##@, #@@#, #@#@, ##@@
Hence, the required answer is
= 52*52*10*10*6
= 16,22,400 attempts
= 1.6 million approx.
How many ways are there of arranging the sixteen black or white pieces of a standard international chess set on the first two rows of the board?
Given that each pawn is identical and each rook, knight and bishop is identical to its pair.
Answer 6,48,64,800 ways
There are total 16 pieces which can be arranged on 16 places in 16P16 = 16! ways.
(16! = 16 * 15 * 14 * 13 * 12 * ..... * 3 * 2 * 1)
But, there are some duplicate combinations because of identical pieces.
There are 8 identical pawn, which can be arranged in 8P8 = 8! ways.
Similarly there are 2 identical rooks, 2 identical knights and 2 identical bishops. Each can be arranged in 2P2 = 2! ways.
Hence, the require answer is
= (16!) / (8! * 2! * 2! * 2!)
= 6,48,64,800
******************************************************************
A person with some money spends 1/3 for cloths, 1/5 of the remaining for food and 1/4 of the remaining for travel. He is left with Rs 100/-
How much did he have with him in the begining?
Answer Rs. 250/-
Assume that initially he had Rs. X
He spent 1/3 for cloths =. (1/3) * X
Remaining money = (2/3) * X
He spent 1/5 of remaining money for food = (1/5) * (2/3) * X = (2/15) * X
Remaining money = (2/3) * X - (2/15) * X = (8/15) * X
Again, he spent 1/4 of remaining maoney for travel = (1/4) * (8/15) * X = (2/15) * X
Remaining money = (8/15) * X - (2/15) * X = (6/15) * X
But after spending for travel he is left with Rs. 100/- So
(6/15) * X = 100
X = 250
Grass in lawn grows equally thick and in a uniform rate. It takes 24 days for 70 cows and 60 days for 30 cows to eat the whole of the grass.
How many cows are needed to eat the grass in 96 days?
Answer 20 cows
g - grass at the beginning
r - rate at which grass grows, per day
y - rate at which one cow eats grass, per day
n - no of cows to eat the grass in 96 days
From given data,
g + 24*r = 70 * 24 * y - A
g + 60*r = 30 * 60 * y - B
g + 96*r = n * 96 * y - C
Solving for (B-A),
(60 * r) - (24 * r) = (30 * 60 * y) - (70 * 24 * y)
36 * r = 120 * y - D
Solving for (C-B),
(96 * r) - (60 * r) = (n * 96 * y) - (30 * 60 * y)
36 * r = (n * 96 - 30 * 60) * y
120 * y = (n * 96 - 30 * 60) * y [From D]
120 = (n * 96 - 1800)
n = 20
Hence, 20 cows are needed to eat the grass in 96 days.
There is a safe with a 5 digit number as the key. The 4th digit is 4 greater than the second digit, while the 3rd digit is 3 less than the 2nd digit. The 1st digit is thrice the last digit. There are 3 pairs whose sum is 11.
Find the number.
Answer 65292
As per given conditions, there are three possible combinations for 2nd, 3rd and 4th digits. They are (3, 0, 7) or (4, 1, 8) or (5, 2, 9)
It is given that there are 3 pairs whose sum is 11. All possible pairs are (2, 9), (3, 8), (4, 7), (5, 6). Now required number is 5 digit number and it contains 3 pairs of 11. So it must not be having 0 and 1 in it. Hence, the only possible combination for 2nd, 3rd and 4th digits is (5, 2, 9)
Also, 1st digit is thrice the last digit. The possible combinations are (3, 1), (6, 2) and (9, 3), out of which only (6, 2) with (5, 2, 9) gives 3 pairs of 11. Hence, the
answer is 65292.
Subscribe to:
Posts (Atom)