צבאד Interview Question for Software Engineers


Country: Isreal
Interview Type: In-Person




Comment hidden because of low score. Click to expand.
0
of 0 vote

Pass the result variable to the function?
like this

void mul(int *a, int *b, int *ans)
{
    *ans = *a * *b;
}

int main(int argc, char const *argv[])
{
    int a = 5;
    int b = 4;
    int ans;
    mul(&a, &b, &ans);
    printf("%d * %d = %d\n", a, b, ans);
    return 0;
}

- PeyarTheriyaa December 23, 2018 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

def mul(a,b):
print(a*b)
return
n1=int(input(" enter the value of n1: "))
n2=int(input(" enter the value of n2 "))
mul(n1,n2)

- Anonymous February 25, 2019 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

# multiplication without using return in python
def mul(a,b):
print(a*b)
return
n1=int(input("Enter the value of n1: "))
n2=int(input("Enter the value of n2: "))
mul(n1,n2)

- Akash Verma February 25, 2019 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

// In C
//we can use pass by reference method
main()
{
fun(&num1, &num2, &res); //function calling
printf("%d * %d = %d", num1, num2, res);
}
//function defintion
void fun(int *num1, int *num2, int *res)
{
*res = (*num1) * (*num2);
}

- Anonymous September 16, 2019 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More