Write a program that finds the minimum total number of
shelves, including the initial one required for this loading
process.
Answer Posted / raveathul farzaana.m.y
#include<stdio.h>
#include<conio.h>
void main()
{
char packet[25];
int
n,counta=0,countb=0,countc=0,countd=0,counte=0,countf=0,countg=0,counth=0,counti=0,countj=0,countk=0,countl=0,countm=0,countn=0,counto=0,countp=0,countq=0,countr=0,counts=0,countt=0,countu=0,countv=0,countw=0,countx=0,county=0,countz=0;
int shelves=0;
printf("Enter the number of packets:");
scanf("%d",&n);
printf("Enter the packets one by one:");
for(i=0;i<n;i++)
{
scanf("%c",&packet[i]);
}
for(i=0;i<n;i++)
{
if(a[i]==A)
counta++;
if(a[i]==B)
countb++;
if(a[i]==C)
countc++;
if(a[i]==D)
countd++;
if(a[i]==E)
counte++;
else if(a[i]==F)
if(a[i]==G)
countg++;
countif(a[i]==H)
counth++;
if(a[i]==I)
counti++;
if(a[i]==J)
countj++;
if(a[i]==K)
countk++;
if(a[i]==L)
countl++;
if(a[i]==M)
countm++;
if(a[i]==N)
countn++;
if(a[i]==O)
counto++;
if(a[i]==P)
countp++;
if(a[i]==Q)
countq++;
if(a[i]==R)
countr++;
if(a[i]==S)
counts++;
if(a[i]==T)
countt++;
if(a[i]==U)
countu++;
if(a[i]==V)
countv++;
if(a[i]==W)
countw++;
if(a[i]==X)
countx++;
if(a[i]==Y)
county++;
if(a[i]==Z)
countz++;
}
if(n>0)
{
if(counta>0)
shelves++;
if(countb>0)
shelves++;
if(countc>0)
shelves++;
if(countd>0)
shelves++;
if(counte>0)
shelves++;
if(countf>0)
shelves++;
if(countg>0)
shelves++;
if(counth>0)
shelves++;
if(counti>0)
shelves++;
if(countj>0)
shelves++;
if(countk>0)
shelves++;
if(countl>0)
shelves++;
if(countm>0)
shelves++;
if(countn>0)
shelves++;
if(counto>0)
shelves++;
if(countp>0)
shelves++;
if(countq>0)
shelves++;
if(countr>0)
shelves++;
if(counts>0)
shelves++;
if(countt>0)
shelves++;
if(countu>0)
shelves++;
if(countv>0)
shelves++;
if(countw>0)
shelves++;
if(countx>0)
shelves++;
if(county>0)
shelves++;
if(countz>0)
shelves++;
printf(shelves)
}
else
{
printf("-1");
cont... after this
| Is This Answer Correct ? | 17 Yes | 3 No |
Post New Answer View All Answers
what is b tree
can u perform addition of two octal numbers using java?
2. Tell me about a time when you had to use your presentation skills to influence someone's opinion.
WHAT HAPPEN WHEN ANY SPINDLE RUN OVER 10 MM HEIGHT ABOVE BOLSTAR IN RING SPINNING FRAME
int main() { int d = 10; int m = 2; int y = 3603; int c = 0; int val; val = ( d + m + y + (y/4) + c) % 7; cout << val; return 0; }
What a test plan contains
convert 140 N.m/cm^2 to N.m/mm^2
What is the weight of a foot square block of bronze.
what is difference between value datatype and object datattype
briefly explain about your project? please tell me about this answer . my current project is ERP domain web based application.please please help me
why c is called middle level langauge?
Why is not creat swap partition in my system.
what is the effect of low frequency(say 48Hz) on TUrbo- Generator set when running for a prolonged period?
successful command to make linux system as router in redhat-+
Question 1 A low-level format received by a floppy disk does what? a. Adds a root directory b. Includes a FAT (File Allocation Table) c. Stores 720K d. Creates a structure of sectors, tracks, & cluster. Question 2 A user is complaining of problems. You find that upon startup, the IBM machine give two beeps alerting you to a POST error. Error code 301 shows. What is wrong with this machine? a. There is a monitor error. b. There is a keyboard error. c. This is not a POST error. Two beeps indicates a motherboard error. d. There is a serial card error. Question 3 What is this an example of? A. A 30-pin SIMM B. A 72-pin SIMM C. A 168-pin DIMM D. C-RIMM Question 4 Bridges are capable of which? a. Expanding the length of a network segment. b. Acting as a firewall. c. Segmenting networks. d. Communication of computers on a LAN. Question 5 Which is true of a female DB 15-pin video port? a. It has 2 rows of 5 pinholes. b. It has 3 rows of 5 pinholes. c. It has one row of 8 pinholes and one row of 7 pinholes d. It has one row of 6 pinholes and one row of 9 pinholes Question 6 You have just installed two hard drives into the same machine. One is set up as the slave and both are on the same IDE channel. You notice that the drive's LED light is constantly lit on the slave drive. What do you need to do to fix this? a. Troubleshoot the slave drive by reconfiguring the slave to be the master, removing the original master drive, then rebooting. b. Disable the secondary controller in the BIOS. c. Manually enter the drive settings on the BIOS. d. Install more memory. Question 7 SVGA and Ultra VGA are two distinct video standards. True or False? a. True. b. False. Question 8 SVGA is represented by all of the following resolutions except: a. 1600 x 1200 b. 800 x 600 c. 640 x 480 d. 1280 x 1024 Question 9 Which is true of an Active Matrix LCD? a. The LCD is divided into two halves. b. The LCD is divided into two halves. c. Each pixel is constantly refreshed. d. The pixels are fixed. e. It uses more electricity. f. None of the above. Question 10 What are the correct stages and order of the EP laser printing process? a. Cleaning, Writing, Conditioning, Developing, Fusing, Transferring, and End of Cycle b. Cleaning, Conditioning, Writing, Developing, Transferring, Fusing, & End of Cycle c. Erasing, Writing, Heating, Developing, Fusing, Transferring, & End of Cycle d. Conditioning, Erasing, Writing, Developing, Fusing, Transferring, & End of Cycle Question 11 Choose the correct associations (pick 2). a. 802.4 – Internetworking b. 802.6 - Metropolitan area network c. 802.9 - Integrated voice and data networks d. 802. 11 - Token ring LAN Question 12 What is the function of a Layer 2 switch ? a. forwards data based on logical addressing b. duplicates the electrical signal of each frame to every port c. learns the port assigned to a host by examining the destination MAC address d. determines which interface is used to forward a frame based on the destination MAC address. Question 13 An administrator would like to connect ten workstations on a 192.168.0.0/24 network. The device selected by the administrator must allow connectivity between hosts without sharing bandwidth. Which device would be appropriate? a. Hub b. Router c. Switch d. Repeater Question 14 Which devices are primarily used to extend cable segments within a collision domain by regenerating the data signals? (Choose two.) a. switch b. repeater c. router d. bridge e. hub Question 15 Which networking devices use the MAC address to make forwarding decisions? (Choose two.) a. NIC b. bridge c. hub d. switch e. repeater Software : 1. Briefly describe the data type conversion feature of Oracle SQL and PL/SQL. 2. What is INDEX? Describe its benefits. 3. Write down the name of five most popular RDBMS. 4. What is UML? Write some Diagram name. 5. What is HTML and XML? 6. What is CSS and AJAX and their benefits? 7. What is software quality assurance? 8. Describe components of a typical test plan? 9. What is the difference between QC and QA? 10. What is Verification and Validation? 11. What diff b/w black box and white box testing? 12. What is the difference between System Testing, Integration Testing & System Integration Testing? ATI Limited Question Paper Duration Time : 1 Hour and 30 Minutes Question 1 A low-level format received by a floppy disk does what? a. Adds a root directory b. Includes a FAT (File Allocation Table) c. Stores 720K d. Creates a structure of sectors, tracks, & cluster. Question 2 A user is complaining of problems. You find that upon startup, the IBM machine give two beeps alerting you to a POST error. Error code 301 shows. What is wrong with this machine? a. There is a monitor error. b. There is a keyboard error. c. This is not a POST error. Two beeps indicates a motherboard error. d. There is a serial card error. Question 3 What is this an example of? A. A 30-pin SIMM B. A 72-pin SIMM C. A 168-pin DIMM D. C-RIMM Question 4 Bridges are capable of which? a. Expanding the length of a network segment. b. Acting as a firewall. c. Segmenting networks. d. Communication of computers on a LAN. Question 5 Which is true of a female DB 15-pin video port? a. It has 2 rows of 5 pinholes. b. It has 3 rows of 5 pinholes. c. It has one row of 8 pinholes and one row of 7 pinholes d. It has one row of 6 pinholes and one row of 9 pinholes Question 6 You have just installed two hard drives into the same machine. One is set up as the slave and both are on the same IDE channel. You notice that the drive's LED light is constantly lit on the slave drive. What do you need to do to fix this? a. Troubleshoot the slave drive by reconfiguring the slave to be the master, removing the original master drive, then rebooting. b. Disable the secondary controller in the BIOS. c. Manually enter the drive settings on the BIOS. d. Install more memory. Question 7 SVGA and Ultra VGA are two distinct video standards. True or False? a. True. b. False. Question 8 SVGA is represented by all of the following resolutions except: a. 1600 x 1200 b. 800 x 600 c. 640 x 480 d. 1280 x 1024 Question 9 Which is true of an Active Matrix LCD? a. The LCD is divided into two halves. b. The LCD is divided into two halves. c. Each pixel is constantly refreshed. d. The pixels are fixed. e. It uses more electricity. f. None of the above. Question 10 What are the correct stages and order of the EP laser printing process? a. Cleaning, Writing, Conditioning, Developing, Fusing, Transferring, and End of Cycle b. Cleaning, Conditioning, Writing, Developing, Transferring, Fusing, & End of Cycle c. Erasing, Writing, Heating, Developing, Fusing, Transferring, & End of Cycle d. Conditioning, Erasing, Writing, Developing, Fusing, Transferring, & End of Cycle Question 11 Choose the correct associations (pick 2). a. 802.4 – Internetworking b. 802.6 - Metropolitan area network c. 802.9 - Integrated voice and data networks d. 802. 11 - Token ring LAN Question 12 What is the function of a Layer 2 switch ? a. forwards data based on logical addressing b. duplicates the electrical signal of each frame to every port c. learns the port assigned to a host by examining the destination MAC address d. determines which interface is used to forward a frame based on the destination MAC address. Question 13 An administrator would like to connect ten workstations on a 192.168.0.0/24 network. The device selected by the administrator must allow connectivity between hosts without sharing bandwidth. Which device would be appropriate? a. Hub b. Router c. Switch d. Repeater Question 14 Which devices are primarily used to extend cable segments within a collision domain by regenerating the data signals? (Choose two.) a. switch b. repeater c. router d. bridge e. hub Question 15 Which networking devices use the MAC address to make forwarding decisions? (Choose two.) a. NIC b. bridge c. hub d. switch e. repeater Software : 1. Briefly describe the data type conversion feature of Oracle SQL and PL/SQL. 2. What is INDEX? Describe its benefits. 3. Write down the name of five most popular RDBMS. 4. What is UML? Write some Diagram name. 5. What is HTML and XML? 6. What is CSS and AJAX and their benefits? 7. What is software quality assurance? 8. Describe components of a typical test plan? 9. What is the difference between QC and QA? 10. What is Verification and Validation? 11. What diff b/w black box and white box testing? 12. What is the difference between System Testing, Integration Testing & System Integration Testing?