Answer:
import java.util.*;
import java.lang.*;
import java.io.*;
class Codechef
{ public static void swapValues(int[] values)
{int temp= values[0];
values[0]=values[1];
values[1]=temp;
System.out.print(values[0]+" "+values[1]);}
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc= new Scanner(System.in);
int A[] = new int[2];
A[0] = sc.nextInt();
A[1]= sc.nextInt();
swapValues(A);
}
}
Input:-
3 8
Output:-
8 3
Input:-
1 2
Output:-
2 1
Answer:
The answer is "Option A".
Explanation:
Database information is a storage file, that contains material for the SharePoint web application for one or more sets of sites. This content may include websites, files, documents, photographs and more. In this storage file a data store in batch mode, which uses a variety of different methods and tools, like custom software programs, that's why the given statement is "True".
Answer:
#include <iostream>
#include <cstring>
using namespace std;
void replacePeriod(char* phrase) {
int i = 0;
while(*(phrase + i) != '\0')
{
if(*(phrase + i) == '.')
*(phrase + i) = '!';
i++;
}
}
int main() {
const int STRING_SIZE = 50;
char sentence[STRING_SIZE];
strcpy(sentence, "Hello. I'm Miley. Nice to meet you.");
replacePeriod(sentence);
cout << "Updated sentence: " << endl;
cout << sentence << endl;
return 0;
}
Explanation:
- Create a function called replacePeriod that takes a pointer of type char as a parameter.
- Loop through the end of phrase, check if phrase has a period and then replace it with a sign of exclamation.
- Inside the main function, define the sentence and pass it as an argument to the replacePeriod function.
- Finally display the updated sentence.
The first one. I hope this can help you