Following are the code to input string value in C Language.
Program Explanation:
- Defining header file.
- Defining the main method.
- Inside the method, two char array "lname, fname" is declared, which inputs value from the user-end.
- After input value, a print method is declared that prints the last name with "," and first name.
Program:
#include <stdio.h>//header file
int main()//defining main method
{
char lname[15],fname[15];//defining two char array
scanf("%s%s",fname, lname);//use input method that takes string value in it
printf("%s , %s",lname,fname);//use print method that prints string value
return 0;
}
Output:
Please find the attached file.
Learn more:
brainly.com/question/14436979
Answer:
#include<iostream>
#include <vector>
#include <list>
using namespace std;
int main(){
int a[10]={0,1,2,3, 4, 5, 6, 7, 8, 9 };
std::vector<int> v (&a[0],&a[0]+10);
std::list<int> l (&a[0],&a[0]+10);
int b[10];
for(int i=0;i<10;i++){
b[i]=a[i];
}
std::vector<int> v2(v);
std::list<int> l2(l);
for(int i=0;i<10;i++){
b[i]+=2;
}
for(int i=0;i<10;i++){
v2[i]+=3;
}
for (std::list<int>::iterator it = l2.begin(); it != l2.end(); it++)
*it=*it+5;
cout<<"Each containers value are: "<<endl;
cout<<"1st array: "<<endl;
for(int i=0;i<10;i++){
cout<<a[i]<<" ";
}
cout<<"\n 1st vector: \n";
for(int i=0;i<10;i++){
cout<<v[i]<<" ";
}
cout<<"\n 1st List is:\n";
for (std::list<int>::iterator it = l.begin(); it != l.end(); it++)
cout << *it << ' ';
cout<<"\n 2nd array: "<<endl;
for(int i=0;i<10;i++){
cout<<b[i]<<" ";
}
cout<<"\n 2nd vector:\n";
for(int i=0;i<10;i++){
cout<<v2[i]<<" ";
}
cout<<"\n 2nd list:\n";
for (std::list<int>::iterator it = l2.begin(); it != l2.end(); it++)
cout << *it << ' ';
return 0;
}
Explanation:
- Initialize an array, a vector and a list of type integer
.
- Create a 2nd array, vector, and list as a copy of the first array, vector, and list.
- Increase the value of each element in the array by 2
, vector by 3 and list by 5.
- Finally display the relevant results.
Answer:
Packets.
Explanation:
A data packet is a unit of data carried by a packet-switched network. Data Packets are transmitted along a given network path. Data travels across internet in packets. A packet can carry 1,500 bytes maximum. A packet contains a header and a footer which tells computers what type of data is in the packet, whats the source and destination of the data.
Transmission control protocol and internet protocol is a collection of communication protocols that for sending and receiving date using internet. TCP breaks the data into packets and maintains the network connection and IP deals with the sending and receiving packets from one computer to other using a process called IP Routing which determines the path for the packets to follow from one computer to the other. Once the packets reach their destination, TCP reforms them into their original state.
Answer:
A Smart Display campaign
Explanation:
Sierra runs the small business which has multiple duties, including distribution towards marketing. She's seemed to have a number of traction through Google (hundreds of transactions each month) as well as aims to expand its scope through developing the Display project.
Yet she would prefer this to be as smooth if feasible. So, Sierra is expected to run a Smart Display campaign.