Subjects
PRICING
COURSES
SIGN IN
Start Free Trial
Shailendra K.
Tutor for 5 years
Tutor Satisfaction Guarantee
R Programming
TutorMe
Question:

Two vectors X and Y are defined as follows – X <- c(3, 2, 4) and Y <- c(1, 2). What will be the output of vector Z that is defined as Z <- X*Y?

Shailendra K.
Answer:

In R language when the vectors have different lengths, the multiplication begins with the smaller vector and continues till all the elements in the larger vector have been multiplied. The output of the above code will be – Z <- (3, 4, 4)

C++ Programming
TutorMe
Question:

What is the output of the following program? #include<iostream> using namespace std; class abc { void f(); void g(); int x; }; main() { cout<<sizeof(abc)<<endl; }

Shailendra K.
Answer:

4 Explanation: Only the class member variables constitutes the size of the class or its object

C Programming
TutorMe
Question:

What is the output of the below code snippet? #include<stdio.h> main() { int a = 5, b = 3, c = 4; printf("a = %d, b = %d\n", a, b, c); }

Shailendra K.
Answer:

a=5, b=3 Explanation: as there are only two format specifiers for printing.

Send a message explaining your
needs and Shailendra will reply soon.
Contact Shailendra
Ready now? Request a lesson.
Start Session
FAQs
What is a lesson?
A lesson is virtual lesson space on our platform where you and a tutor can communicate. You'll have the option to communicate using video/audio as well as text chat. You can also upload documents, edit papers in real time and use our cutting-edge virtual whiteboard.
How do I begin a lesson?
If the tutor is currently online, you can click the "Start Session" button above. If they are offline, you can always send them a message to schedule a lesson.
Who are TutorMe tutors?
Many of our tutors are current college students or recent graduates of top-tier universities like MIT, Harvard and USC. TutorMe has thousands of top-quality tutors available to work with you.