Questions: 1 362

Answers by our Experts: 1 362

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

tell me the logic of this(it is a program of c)
main()
{int x,y,z;
x=y=z=-1;
z=++x&&++y&&++z;
printf("%d%d%d",x,y,z);
}
Following is my code that I use to connect windows application to my server, But on office machines where limited access to internet, I can not connect i.e. this code fails. I have to use proxy for this. Please help me in writing proxy for following code.

{
TcpClient client = new TcpClient();
client.Connect("98.130.254.199", 0x599);
client.Close();
}
Develop a serial program to calculate a factorial using a for loop. No recursion. Time it.

to be done in c language.


Sharon has started to use both the stock details management and the file information viewer
features of the application. However, while using the file information viewer application, she
accidentally enters the path of a folder that does not exist on her computer. This caused the
application to stop responding. In addition, the format in which the stock details are displayed is
not clear. Therefore, she asks Hayley to modify the application so that:
The file information viewer does not stop responding in case a specified folder does not exist.
The stock details management application adds a line break before every stock details entry
whenever a new entry is added to the stock details file.
Write the code snippets that Hayley should use to address the preceding two requirements [10
Marks]



As part of her business activities, Sharon has created a large number of files and folders.
Whenever she needs to view the details of the files stored in a folder, Sharon browses to the folder
using Windows Explorer. However, she finds it cumbersome to browse to each individual folder to
view the desired details. Therefore, she asks Hayley to modify the application to accept the name
of a folder and display the following details of the files located in the folder:
File name
File size
File creation date
Write the code that Hayley should write to create the desired file information viewer application.
[10 Marks]


Hayley has started the application development. She needs to ensure that the application meets
the following requirements:
When the application starts, it should display a message asking the user to enter either option d or
v. The application should execute the following actions for the two options:
d: The application should display the file extension of the stock details.
v: The application should open the stock details file in the read-only mode and display its
contents.
Write the code snippet that Hayley should use to implement the desired functionality in the
application.
In case the user presses any other key, the application should open the stock details file in the
read/write mode, display a message to enter new stock details, and save the details that the user
has entered. Write the code snippet that Hayley should use to accomplish the preceding task. [10
Marks]
#include <stdio.h>
main()
{
int h1, m1, s1, h2, m2, s2, h3, m3, s3, oper, A, S;
printf("Please enter first clock:\n");
scanf("%d:%d:%d", &h1, &m1, &s1);
printf("Please enter second clock:\n");
scanf("%d:%d:%d", &h2, &m2, &s2);
printf("Enter A for addition or S for subtraction:\n");
scanf("%d", &oper);
{
if(oper=='S')
{
s3=(s1-s2);
m3=(m1-m2);
h3=(h1-h2);
if(s3<0)
{
s3=s3+60;
m3=m3;
h3=h3+24;
}
}
else
if(oper=='A');
{
s3=(s1+s2)%60;
m3=(m1+m2+((s1+s2)/60))%60;
h3=(h1+h2+((m1+m2)/60))%24;
}
}
printf("%2.2d:%2.2d:%2.2d\n", h3, m3, s3);
return 0;
}


the program only adds when i try to subtract instead of subtracting it adds them take a look n see if my if statement is wrong
write a program to accept a number and check whether its prime or not?
Write a C# program to count the number of negative numbers in a sequence of numbers the user inputs. In this solution, before reading the numbers, ask the user to input how many numbers will be input.
Write a program to evaluate the net salary of an employee given employee if his basic salary is 12000GHS , Domestic allowance(DA) is 12% of basic salary, HRA is 250. He is taxed Income Tax of 20% of his basic salary.

Net Salary = basic salary + DA+ HRA –Income Tax
LATEST TUTORIALS
APPROVED BY CLIENTS