Enable contrast version

Tutor profile: Vikas S.

Inactive
Vikas S.
Online tutoring experince. Software Engineer at Infoedge
Tutor Satisfaction Guarantee

Questions

Subject: PHP Programming

TutorMe
Question:

there is a string having numbers from 1 to 10 separated by a comma 1,2,3,4,5,6,7,8,9,10 How will you calculate its sum of such a string?

Inactive
Vikas S.
Answer:

let say input is 1,2,3,4,5,6,7,8,9 ANSWER print_r( array_sum( explode( ",", $input ) ) ); steps: 1)split the string into comma using explode function in PHP 2)use an aray_sum PHP function to calculate the sum of array elements

Subject: Java Programming

TutorMe
Question:

what is static import in java?

Inactive
Vikas S.
Answer:

In java whenever we have to use methods or variables of another class we usually import that class and then use its functions and variables. for example: import java.lang.Math; //inside class double test = Math.PI * 5; Instead of importing the whole class we can just import methods or/and variables of that class by using the static import. Example: import static java.lang.Math.PI; //no need to refer class now double test = PI * 5;

Subject: C Programming

TutorMe
Question:

what will be the output of the following program 1 #include "stdio.h" 2 int main() 3 { 4 void *pVoid; 5 pVoid = (void*)0; 6 printf("%lu",sizeof(pVoid)); 7 return 0; 8 }

Inactive
Vikas S.
Answer:

At line number 4 we are creating a void pointer(a pointer that can point to any data type) now on line 5, 0 is assigned to that pinter. so this is the address that pvoid will hold now. As a pointer just hold an integer which should be a valid memory address, otherwise it can through an error at runtime. In the next line, we are printing size of this pointer so size will be equal to the size of int

Contact tutor

Send a message explaining your
needs and Vikas will reply soon.
Contact Vikas

Request lesson

Ready now? Request a lesson.
Start Lesson

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 Lesson" 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.