Engineer Internship Interview Questions | Glassdoor

Engineer Internship Interview Questions

258

Engineer internship interview questions shared by candidates

Top Interview Questions

Sort: Relevance Popular Date

How would you count the number of words in a string consisting of uneven number of spaces between words( not dictionary words)? With and without library functions.

3 Answers

With -Use Java String Tokenizer or split function

int wc(char *s) { if (!s) return -1; int wc = 0; /* prune initial continuous spaces */ while (*s == ' ') ++s; /* count spaces, i.e words! */ while (*s != '\0') { if (*s == ' ') { ++wc; s++; /* prune continuous spaces */ while (*s == ' ') ++s; } else ++s; } /* sentence can end without space, check last word has been accounted */ if (*(s-1) != ' ') ++wc; return wc; }

char str[] = "jdjd jdjd jriri"; count=0; for(i=0; i<=strlen(str); i++) { // str[i] while(str[i]==' ') { i++; } count++; while(str[i]!=' ') { i++; } }

Given an array of positive and negative numbers, give an algorithm that would find the sequence of numbers that give the largest sum. The numbers have to be in sequential order.

2 Answers

What is the angle between hour hand and minute hand at 3.15?

2 Answers

What is the difference between a Class in C and an Object in C++?

2 Answers

What is the difference between a signed and unsigned integer variable type?

2 Answers

Given two arrays one with expected numbers and other with actual numbers determine which number is missing in the actual array

2 Answers

How many simulations would it take to get an accuracy of less than or equal to 1%

2 Answers

ur best subject in school and why

2 Answers

Write codes for the Nth Fibonacci number.

3 Answers

what was a technical difficulty and how have you overcome it.

2 Answers
110 of 258 Interview Questions