answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

How would you describe two instances where you have used detail-oriented skills?

I worked in a warehouse for a manufacturer that used a barcode and location computer system with scanners to keep track of product, stage orders, and keep track of product. As a Material Handler you had to be very detail-oriented and exact in placement and record keeping or operations would be compromised.

As a Movie House Manager for Kerasotes Theaters I was responsible for a payroll system that dealt with tenths of an hour and had to be monitored regularly for human error and reentered into an online system that was very detail-oriented.

What is the difference between the assignment operator and the equals operator?

The quality operator and the assignment operator are binary operators; they have two operands, one on either side of the operator.

The equality operator is a Boolean operator which compares the two operands, returning true if they have the same logical state, otherwise false.

E.g., x==y returns true if x and y have the same logical state, otherwise false. The operator is commutative, such that x==y is the same as y==x.

The assignment operator sets the value of the left operand to that of the right operand, such that they both have the same logical state. After assignment, the left operand is returned.

E.g., x=y returns x while y=x returns y. After the assignment, x==y must be true.

Write a C Program on Daewoo a Bus service Reservation System?

// Bus Reservation System

# include <stdio.h>

# include <conio.h>

void install();

void reservation();

void show();

void allbus();

void removebus();

void position(int);

struct bus

{

int bn; //Bus No.

float bt; //Arrival Time

char bd[20],from[10],to[10],seat[32][10]; //Driver Name,Journey From,Journey To

}b;

void install()

{

FILE *fp;

fp=fopen("abc.dat", "ab");

clrscr();

if(fp==NULL)

{

printf("File Creation Failed!");

}

else

{

printf("\n\t\tEnter Bus No.:= ");

scanf("%d",&b.bn);

printf("\n\t\tEnter Driver's Name:= ");

fflush(stdin);

scanf("%s",&b.bd);

printf("\n\t\tEnter Arrival Time:= ");

scanf("%f",&b.bt);

printf("\n\t\tEnter Journey From:= ");

fflush(stdin);

scanf("%s",&b.from);

printf("\n\t\tEnter Journey To:= ");

fflush(stdin);

scanf("%s",&b.to);

fwrite(&b, sizeof(b), 1, fp);

printf("\n\nBus Successfully Install");

}

printf("\n\nPress any key to Conti..");

getche();

fclose(fp);

}

void reservation()

{

int number,s;

int flag=0;

FILE *fp;

fp=fopen("abc.dat","rb+");

clrscr();

printf("\n\nEnter Bus No:= ");

scanf("%d",&number);

if(fp==NULL)

{

printf("\n\tFile doesn't exist!!!\TRY AGAIN");

}

else

{

while((fread(&b, sizeof(b), 1, fp))==1)

{

if(b.bn==number)

{

printf("\nEnter Seat Number:= ");

scanf("%d",&s);

flag=1;

if(s>32)

{

printf("\n\nThere are only 32 seats available in this bus");

break;

}

else

{

if(strcmp(&b.seat[s-1],NULL)==0)

{

printf("\nEnter Passenger's Name:= ");

fflush(stdin);

scanf("%s",&b.seat[s-1]);

fseek(fp,ftell(fp)-sizeof(b),0);

fwrite(&b,sizeof(b),1,fp);

printf("\n\nReservation is Success");

break;

}

else

{

printf("\n\nThe seat no %d is already resevered",s);

}

}

}

}

if(flag==0)

{

printf("\n\nBus Not Available");

}

}

printf("\n\nPress any key to Conti..");

getche();

fclose(fp);

}

void show()

{

int number;

int flag=0;

FILE *fp;

fp=fopen("abc.dat","rb");

clrscr();

printf("\n\nEnter Bus No:= ");

scanf("%d",&number);

if(fp==NULL)

{

printf("\n\tFile doesn't exist!!!\TRY AGAIN");

}

else

{

while((fread(&b, sizeof(b), 1, fp))==1)

{

if(b.bn==number)

{

printf("\nBus Number:= %d",b.bn);

printf("\nBus Driver's Name:= %s",b.bd);

printf("\nBus Arravial Time:= %.2f",b.bt);

printf("\nBus Journey From:= %s",b.from);

printf("\nBus Journey To:= %s",b.to);

flag=1;

position(b.bn);

}

}

if(flag==0)

{

printf("\n\nBus Not Available");

}

}

printf("\n\nPress any key to Conti..");

getche();

fclose(fp);

}

void position(int a)

{

int s=0,p=0;

int i;

printf("\n\n");

for(i=0;i<32;i++)

{

s++;

if(strcmp(&b.seat[i],NULL)==0)

{

printf("%d. Empty\t",s);

p++;

}

else

{

printf("%d. %s\t",s,b.seat[i]);

}

}

printf("\n\nThere are %d seats empty in bus no. %d",p,a);

}

void allbus()

{

int no=0;

FILE *fp;

fp=fopen("abc.dat","rb");

clrscr();

if(fp==NULL)

{

printf("\n\tFile doesn't exist!!!\TRY AGAIN");

}

else

{

while((fread(&b, sizeof(b), 1, fp))==1)

{

printf("\n\n=============================================================================");

no++;

printf("\nBus Number:= %d",b.bn);

printf("\nBus Driver's Name:= %s",b.bd);

printf("\nBus Arravial Time:= %.2f",b.bt);

printf("\nBus Journey From:= %s",b.from);

printf("\nBus Journey To:= %s",b.to);

printf("\n\n=============================================================================");

printf("\n\nPress any key to Conti..");

getche();

}

printf("\n\nTotal number of Bus(es) present:= %d",no);

}

printf("\n\nPress any key to Conti..");

getche();

fclose(fp);

}

void removebus()

{

int number;

int flag=0;

char ch;

FILE *fp,*ft;

fp=fopen("abc.dat","rb");

ft=fopen("temp.dat","wb");

clrscr();

printf("\n\nEnter Bus No:= ");

scanf("%d",&number);

if(fp==NULL)

{

printf("\n\tFile doesn't exist!!!\TRY AGAIN");

}

else

{

while((fread(&b, sizeof(b), 1, fp))==1)

{

if(b.bn==number)

{

flag=1;

printf("\nAre you sure want to Remove Bus %d ??(Y/N)",b.bn);

fflush(stdin);

scanf("%c", &ch);

}

}

if(flag==0)

{

printf("\n\nBus Not Available");

}

else

{

if(ch=='y'ch=='Y')

{

rewind(fp);

while((fread(&b, sizeof(b), 1, fp))==1)

{

if(b.bn!=number)

{

fwrite(&b, sizeof(b), 1, ft);

}

}

remove("abc.dat");

rename("temp.dat", "abc.dat");

printf("\n\nBus Remove Success");

}

else

{

printf("\n\nBus Not Remove");

}

}

}

printf("\n\nPress any key to Conti..");

getche();

fclose(fp);

fclose(ft);

}

void main()

{

int c;

clrscr();

printf("\n=============================================================================");

printf("\n\nDevloped By:= Chhatrala Chirag A. && Samani Jeki J.");

printf("\n\nGuided By:= Jatin Sir");

printf("\n\n=============================================================================");

printf("\n\n\t\t\tBUS RESERVATION SYSTEM");

printf("\n\n=============================================================================");

while(1)

{

printf("\n\n\n");

printf("\t\t\t1.Install\n\t\t\t2.Reservation\n\t\t\t3.Show\n\t\t\t4.Bus(es) Available\n\t\t\t5.Remove Bus\n\t\t\t6.Exit");

printf("\n\n\t\t\tEnter Your Choice:=> ");

scanf("%d",&c);

switch(c)

{

case 1:

install();

break;

case 2:

reservation();

break;

case 3:

show();

break;

case 4:

allbus();

break;

case 5:

removebus();

break;

case 6:

printf("\n\nThank You!!!!");

printf("\n\nPress any key to Conti..");

getche();

exit(0);

break;

default:

printf("\n\t\t\tInvalid Choice\n\t\t\tTry Again....");

break;

}

}

}

How do you remove the f-source button from an f-source drop-down menu Is there a code to be removed for this?

You need to purchase the full version of the f-source product in order to get rid of the f-source button. The trial version does not allow the f-source button to be removed.

What converts a high level language into a machine language line by line?

An interpreter.

Not to be confused with a compiler which compiles the entire program into native machine code, optimising the resultant code for efficiency. However, some compiled languages, such as Java, compile to byte code rather than machine code. Java byte code must still be interpreted by the Java Virtual Machine runtime in order to produce the required machine code, which is more efficient than a fully-interpreted language would be, but nowhere near as efficient as a native machine code compilation would be. The problem with native machine code is that it is non-portable; it must be recompiled for each target platform, whereas interpreted languages do not (the interpreter handles the machine-specifics at runtime).

Can an array be passed from a function to the calling portion of the program via a return statement?

It depends on the language, but in most cases yes, you can return arrays to callers via the return statement.

In C, arrays can be returned from a function by reference (that is, by pointer) but never by value (arrays cannot be copied automatically). The array must be allocated on the heap, never on the stack (you cannot return references to local variables). However, beware that returning arrays by reference is unsafe because there's no way to determine the upper bound of the array. This is why many C library functions return multiple values through output parameters and use the return value to indicate error conditions.

One way to return both the array and its size via a return statement is by returning a structure:

struct array_info {

void* array_ptr; /* pointer to first element in array */

int size; /* number of elements in the array */

};

Obviously you must cast the array_ptr member to the appropriate type before dereferencing any of the array elements.

In C++, C-style arrays work just as they do in C. However, the preferred method is to use a vector rather than a C-style array. A vector is a class template that encapsulates a C-style array with size and reserve, along with a rich set of useful functions (as with all templates, you don't pay for what you don't use). Vectors can be returned from functions both by value and by reference. Vectors also support move semantics making it possible to return vectors allocated on the stack as well as on the heap. C++ also supports an array class template. This is specifically for fixed-size arrays but is otherwise similar to a vector.

How do you append a output of a program to a program?

you mean like show some sample output? Just put it in comments at the bottom. Run the program, and in the top left of the command prompt there is a button you can click. Select mark, highlight the output, then select copy. Paste it onto the end of the program.

What is the best way to learn how to paraphase?

1. Read the material and make sure that you really understand what it is saying. 2. Pretend that you are teaching someone else about this material, and explain it to them - this is called "using your own words" or paraphrasing. 3. It is usually best to check your version against the original - ask an adult or another student (one who is making good grades) to listen to you (or to read over your paraphrase) and tell you if you have left anything out or misunderstood it.

Do you need a web server to publish documents on the web?

Yes!And you will get all of that when you buy or get a web hosting. So for that you will need to get the webs server hosting but its not necessary to own one.

Use the in operator to find the number and name of each customer that placed an order on October 23 2010?

select customer.customer_num, customer_name from customer, orders where orders.order_date in ('23-OCT-10');

What are the uses of procedural programming?

Procedural programming language involves coding instructions that a computer executes in a particular order. The language makes it easy to debug different procedures in isolation. It is also easy to read the code hence making it easy to change a particular procedure. The disadvantages include the need to change large portions of the code during porting and inability to use the original code on a different application.

Adaptive design approach to decision support system?

In an adaptive design approach, the four traditional system development activities (requirements analysis,design, development, and implementation) are combined into a single phase, which is iteratively repeated in a relatively short time. In the framework of adaptive design the major components include the builder, the user, and the technical system(DSS). During the design process, these elements interact with (îInfluenceî) each other. Hence, three adaptive links are established in this framework: the user-system, the user-builder and the builder system. In this framework, the user is either the manager or individual faced with a problem or opportunity. The user is responsible for taking action and its consequences. In some cases, the user may not directly interact with the technical system.

Write a program to demonstrate constructor overloading?

Constructor overloading is similar to method overloading. You can overload constructors by changing the parameter list in the class definition.

Here is an example

public class Box{

private int height;

private int width;

private int breadth;

// First constructor with no parameters

Box(){

height = 0;

width = 0;

breadth = 0;

}

// This is the second overloaded constructor

Box(int h,int w,int b){

height = h;

width = w;

breadth = h;

}

public void display(){

System.out.println("Height: "+height+" Width: "+width+" Breadth: "+breadth);

}

public static void main(String args[]){

Box obj = new Box(1,2,3);

obj.display();

}

}

Describe a time when your workload was heavy and how you handled it?

There are many times when a person's work load can become very heavy. Some people handle it by looking at one thing at a time.

Find the 2nd largest and 2nd smallest from a set of a numbers using 8085 microprocessor?

Arrange the any one of the order and store the memory in order vice

(ie.Ascending for Descending)

Then print the second data of that array

it is simple way