please use linux/unix command terminal to complete,
step 1
1-create a new directory named by inlab4...
please use linux/unix command terminal to complete,
step 1
1-create a new directory named by inlab4
enter directory inlab4
create a new file named by reverse.c with the following contents
and then close the file:
/*reverse.c */
#include <stdio.h>
reverse(char *before, char *after);
main()
{
char str[100]; /*Buffer to hold reversed string
*/
reverse("cat", str); /*Reverse the string "cat"
*/
printf("reverse(\"cat\")=%s\n", str); /*Display result
*/
reverse("noon", str); /*Reverse the string "noon"
*/
printf("reverse(\"noon\")=%s\n", str); /*Display result
*/
}
reverse(char *before,...
The code is in C programming language pls convert it into
python. Thanks.
Program -->
#include...
The code is in C programming language pls convert it into
python. Thanks.
Program -->
#include <stdio.h>
#include <stdlib.h>
void main()
{
//declare variables
FILE *fileptr;
char filename[15];
char charRead;
char filedata[200],searchString[50];
int i=0,j=0,countNoOfWord=0,count=0;
//enter the filename to be opened
printf("Enter the filename to be opened \n");
scanf("%s", filename);
/* open the file for reading */
fileptr = fopen(filename, "r");
//check file exit
if (fileptr == NULL)
{
printf("Cannot open file \n");
exit(0);
}
charRead = fgetc(fileptr);
//read the string...
THIS PYTHON PROGRAMMING
On a chessboard, positions are marked with letters between a and
h for...
THIS PYTHON PROGRAMMING
On a chessboard, positions are marked with letters between a and
h for the column and a number between 1 and 8 for the row. The
first place on the board, a1, is black. The next is white,
alternating across a row. Odd rows start with black, even rows
start with white. Given a 2 character input string with a letter
(a-h) and a number (1-8), print "Black" or "White" indicating if
the square is black or...
Each person in the group will be responsible for rewriting the
code to solve one of...
Each person in the group will be responsible for rewriting the
code to solve one of the original parts
(celebrity names), without using arrays or loops. The
purpose of this assignment is to practice Strings manipulation and
String methods so full credit will only be given if you are
utilizing the code for Strings (substring, charAt, compareTo,
equals, etc). program Java
this was my last assigment
Take the 4th and the 5th words from part 1 and print out both...
This is the java code that I have, but i cannot get the output
that I...
This is the java code that I have, but i cannot get the output
that I want out of it. i want my output to print the full String
Form i stead of just the first letter, and and also print what
character is at the specific index instead of leaving it empty. and
at the end for Replaced String i want to print both string form one
and two with the replaced letters instead if just printing the
first...
Develop a Traceroute application in python using ICMP. Your
application will use ICMP but, in order...
Develop a Traceroute application in python using ICMP. Your
application will use ICMP but, in order to keep it simple, will not
exactly follow the official specification in RFC 1739..
Below you will find the skeleton code for the client. You are to
complete the skeleton code. The places where you need to fill in
code are marked with #Fill in start and
#Fill in end.
Code
from socket import *
import os
import sys
import struct
import time
import...
convert code from python to cpp
L =
[2,7,4,19,45,16,9,13,8,69,55,11,23,98,14,5,1,3]
#Merging function
def merge(M,N):
merging_list = []...
convert code from python to cpp
L =
[2,7,4,19,45,16,9,13,8,69,55,11,23,98,14,5,1,3]
#Merging function
def merge(M,N):
merging_list = [] //create empty
list to merge the lists M and N
if not M:
//if M is empty list,
m = 0
//set m = 0
else:
m = len(M)
//otherwise, set m = len(M)
if not N:
//if N is empty list,
n = 0 ...