soundararajanaravind
BAN USER
Questions (3)
Reputation 10
- 0of 0 votes
AnswersPredict the out put of the following code
#include<stdio.h> int g = 0; int Add(int i) { static int s=0; s =s+i; g=g+i; return s; } int main() { int s=0;int g=0,j; for(int i=1;i<=11;i++) { g=0;s=0; j = add(i); } printf("%d,%d",j,g); return 0; }
Predict the output
- soundararajanaravind in India| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer C - 0of 0 votes
AnswersGiven an Array With random 0s and non 0 numbers, shift all the 0s to the beginning and non 0s to the rear.
- soundararajanaravind in India
Eg: 1,9,8,4,0,0,2,7,0,6,0
Out put 0,0,0,0,1,9,8,4,2,7,6
i.e order of numbers not to change. Do it in place| Report Duplicate | Flag | PURGE
Microsoft Student student Arrays
Page:
1
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.