C Interview Questions
- 0of 0 votes
Answersread the 5'th bit from a byte
- amitaiweil December 23, 2018 in Isreal| Report Duplicate | Flag | PURGE
צבאד Software Engineer C - 0of 0 votes
AnswerWrite a function which returns
- amitaiweil December 23, 2018 in Isreal
the multiplication of two inputs,
without using "return"| Report Duplicate | Flag | PURGE
צבאד Software Engineer C - 0of 0 votes
Answers4. Find an algorithm for finding the longest ascending order sub-sequence in an unsorted array of integers.
- amitaiweil December 09, 2018 in Isreal
Example: { 16, 4, 8, 22, 33, 7, 71} == > { 16, 22, 33, 71 }| Report Duplicate | Flag | PURGE
Brossh Developer Program Engineer C - 0of 0 votes
Answers3. Implement a descending and ascending sort by building a binary tree and traversing it.
- amitaiweil December 09, 2018 in Isreal| Report Duplicate | Flag | PURGE
Brossh Developer Program Engineer C - 0of 0 votes
Answers2. Implement a double linked list
- amitaiweil December 09, 2018 in Isreal| Report Duplicate | Flag | PURGE
Brossh Developer Program Engineer C - 0of 0 votes
AnswerGiven a point and a radius r, draw a circle.
- Wandering programmer September 12, 2018 in United States| Report Duplicate | Flag | PURGE
Pure Storage Software Engineer C C++ - 0of 0 votes
AnswersWrite a program to print Fibonacci sequence in reverse order?
- D PRAVEEN KUMAR May 24, 2018 in India| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Analyst C - 0of 0 votes
AnswerHi, my question is about linked list? If I read .txt file (there is 5000 words inside) in to linked list. Is it possible to print 100 mostly repeated words and print them ??
- bomanob January 17, 2018 in Sweden
example:
cat cat dog dog dog
dog3
cat 2
Thank you in advance for any help you can provide.| Report Duplicate | Flag | PURGE
Student Software Engineer C - 1of 1 vote
AnswerSachin's sister loves chocolates a lot. So he decided to gift her N boxes of delicious chocolates. Every box has the capacity of 1000 chocolates. Filling more than 1000 chocolates in a box will break it and all the chocolates in it will fall down and will become uneatable. Sachin is also concerned about her health, so he advised her to eat as minimum as possible chocolates. So she decided that every day she will pick a box containing the minimum amount of chocolates and will eat half of its chocolates and will put remaining chocolates in the box having next minimum amount of chocolates. If there is no next box remaining then she will eat all of the chocolates from the current box. She will throw away all the empty and broken boxes every day. This will continue until all the boxes are gone. Being concerned about her health Sachin asked her to tell him the number of chocolates she eats every day. But she forgets the number every day. So help her to find out how many chocolates she eats every day. Basically, you have to output the total sum of chocolates she eats.
- shahulameen.SA December 09, 2017 in India
Input Format
Your function contains one argument- A One dimensional Integer array of Size N in which ith element denotes the number of chocolates in ith box.
First line of input contains an Integer N denoting the size of Array. (1<=N<=10^5)
Next N lines of input contain a single integer from 1 to 1000.
Constraints
1<=N<=10^5
Output Format
You must return a integer
Sample TestCase 1
Input
3
1
2
3
Output
6| Report Duplicate | Flag | PURGE
C - 9of 11 votes
Answers(Q2)what is output and explain why?
- kundankristo September 07, 2017 in India
struct abc
{
double d;
char c;
int b;
}st;
int main()
{
int i=sizeof(st);
printf("%d",i);
}| Report Duplicate | Flag | PURGE
Student Software Engineer in Test C - -2of 2 votes
Answerplease help me ...i am confused
- kundankristo September 07, 2017 in India
(Q1)what is output and explain why?
struct abc
{
char c;
double d;
int b;
}st;
int main()
{
int i=sizeof(st);
printf("%d",i);
}
......................................................................................................................................................................................................| Report Duplicate | Flag | PURGE
Student Software Engineer in Test C - 0of 0 votes
AnswersWrite a program to print the list of the maximum repeating number from an array.
- D PRAVEEN KUMAR April 11, 2017 in India
Example:
Input:: a[]={1, 2, 1, 0, 5, 2, 4, 2, 3, 0, 1, 3, 2, 4}
output: 2, 1, 0, 4, 3, 5| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Data Scientist C - 0of 0 votes
AnswersA string has multiple spaces like "Fung ible is" .When ever there a space keep one space and remove all other spaces. output "Fung ible is"
- John4jobs March 08, 2017 in United States| Report Duplicate | Flag | PURGE
Fungible Developer Program Engineer C - 1of 1 vote
AnswersWe define an undirected graph g,such that: The total number of nodes in the graph is g_nodes. The nodes are numbered sequentially as 1,2,3….g_nodes. The total number og edges in the graph is g_edges. Each edge connect two distinct nodes(i.e no edge connect a node to itself). The weight of the edge connecting nodes g_to[i] and g_from[i] is g_weight[i]. We define the weight of the path from some start node to some end node to the sum of all edges traversed on the path. Input formate: The first line contain two space-seperated integer describing the respective value of g_node and g_edge. Each line I of the g_edge subsequent lines contain three space –seperated integer describing the respective value of g_to[i],g_from[i] and g_weight[i]. The next line contain an integer denoting start The next line contain an integer denoting end. The next line contain an integer denoting w_extra. input 1:
- zila.techy October 21, 2016 in India
4 4
1 2 2
2 3 1
2 4 2
3 4 3
1
4
5
Output:4
input2:
5 5
1 2 2
1 4 4
2 3 1
3 4 3
4 5 1
1
4
2
output:3
Int mincost(int g_nodes,int g_edged,int* g_from,int* g_to,int* weight,int start,int end,int w_extra)
{
}| Report Duplicate | Flag | PURGE
Amazon Developer Program Engineer C - 0of 0 votes
AnswersAs you guys know, C did not have,and does not have anything called class. C++ has them. Now, C++ was written using C. In fact, C++ initially was called C with classes.
- NoOne October 14, 2016 in India
Thus, here is the problem for you.
Given you have C, and you need to implement class like behaviour, how you would do it? Specifically, implement the following in C :
1. A Simple Hello class with hello() function printing "Hello, World" .
2. A new operator which enables creating this constructor less class.
3. A delete operator that deletes the pointer.
How would you do it?| Report Duplicate | Flag | PURGE
Deshaw Inc SDET C - 0of 0 votes
AnswersWrite a program to print pascal triangle using binomial formula.
- D PRAVEEN KUMAR October 06, 2016 in India| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Software Developer C - 0of 0 votes
AnswersWrite a program to check a given matrix is Idempotent or not.
- D PRAVEEN KUMAR October 06, 2016 in India| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Software Developer C - -1of 1 vote
AnswersWrite a program to check a given matrix is involutive or not.
- D PRAVEEN KUMAR October 06, 2016 in India| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Software Developer C - -1of 1 vote
AnswersWrite a program to check a given matrix is orthogonal or not.
- D PRAVEEN KUMAR October 06, 2016 in India| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Software Developer C - 0of 0 votes
AnswerWrite a program to check a given matrix is A symmetric matrix or not.
- D PRAVEEN KUMAR October 06, 2016 in India| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Software Developer C - 0of 0 votes
Answerswrite a program to count number of prime number between two numbers entered by the user
- D PRAVEEN KUMAR October 04, 2016 in India| Report Duplicate | Flag | PURGE
HTC Global Services Software Developer C - 0of 0 votes
Answerswrite a function called reverse to print the reverse of the digit entered by the user.
- D PRAVEEN KUMAR October 04, 2016 in India| Report Duplicate | Flag | PURGE
HTC Global Services Software Developer C - 0of 0 votes
Answerwrite a program to implement following logic
- D PRAVEEN KUMAR October 04, 2016 in India
If the price of the book in between 100 to 500 book is “Normal Book”
If the price is between 501 and 5000 book is “Costly book”
If greater than 5000 than book is “precious book”| Report Duplicate | Flag | PURGE
HTC Global Services Software Developer C - 1of 1 vote
AnswerWrite a program to implement following logic
- D PRAVEEN KUMAR October 04, 2016 in India
An employee can be promoted if
a) He has good communication skills
b) He is good in training
c) He is either good in programming or debugging.| Report Duplicate | Flag | PURGE
HTC Global Services Software Developer C - 0of 0 votes
AnswersWrite a C program to convert date from 24 hrs format to 12 hrd format? Ex: 23:10 = 11:10PM
- D PRAVEEN KUMAR September 26, 2016 in India| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Software Developer C - 0of 0 votes
AnswersWrite C program such that if an element in an MxN matrix is 0, its entire row and column is set to 0.
- D PRAVEEN KUMAR September 26, 2016 in India| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Software Developer C - 0of 0 votes
AnswersEither C or C++ is faster and which one is efficiently access memory?
- D PRAVEEN KUMAR September 22, 2016 in India| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Tech Lead C - 0of 0 votes
AnswersCan we execute a C program with out main?
- D PRAVEEN KUMAR September 22, 2016 in India| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Tech Lead C