Skip to content
Related Articles

Related Articles

Josh Technology Interview Experience | MCQ Online questions
  • Difficulty Level : Easy
  • Last Updated : 04 Sep, 2019

Round 1:

1.What is the output of the following code?

#include <stdio.h>

int main()
{
int x=5;
if(x==5){
if(x==5)break;
printf(“Hello”);
}
printf(“Hi”);
}

2.



What is the output of the following code?

#include <stdio.h>

int main()
{
int x=1, 2, 3;
printf(“%d”, i);
}

3.What is the output of the following code?

#include <stdio.h>

int main()
{
char s1[7]=”1234″, *p;
p=s1+3;
*p=’6′;
p=p-2;
*p=’8′;
printf(“%s”, s1);

}

4.What is the output of the following code?

#include <stdio.h>

int main()
{
int a=10, b=5, c=5;
int d;
d=b+c==a;
printf(“%d”, d);
}

5.What is the output of the following code?

#include <stdio.h>

int main()
{
char*p;
p=”hello”;
printf(“%c”, *&*p);
}

6. What is the output of the following code?

#include <stdio.h>

int main()
{
if(printf(“Hello”))
printf(“hi”);
else{
printf(“condition failed”);
}
}

7.What is the output of the following code?

#include <stdio.h>
#define int n= printf(“COMPANY”);
int main()
{
int n=10;
printf(“%d”, n);
}



8.What is the output of the following code?

#include <stdio.h>
int main()
{
int m, i=0, j=1, k=2;
m=i++||j++||k++;
printf(“%d %d %d %d”, m, i, j, k);
}

9.What is the output of the following code?

#include <stdio.h>
int main()
{
1|printf(“%d”, 10?0?5:1:12);
}

10.What is the output of the following code?

#include <stdio.h>
int main()
{
int i=0;
if(i==0){
i=(15, (i-3), 13, i++, i*10);
printf(i);
}
else
printf(“equal”);
}

 

Write your Interview Experience or mail it to contribute@geeksforgeeks.org

My Personal Notes arrow_drop_up
Recommended Articles
Page :