Software Engineer Internship Interview Questions | Glassdoor

Software Engineer Internship Interview Questions

142

Software 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

Write codes for the Nth Fibonacci number.

3 Answers

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

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

Print the nodes of a complete binary tree in level order.

2 Answers

The questions weren't difficult--I just was a little rusty in the morning and didn't do so well. I think the hardest one was to traverse a linked list and remove any odd elements.

2 Answers
110 of 142 Interview Questions