Coding | Mcqs | Multiple choice questions | Informative | Computer Science | Engineering | Aptitude | Quants | Verbal

INFEED

C Starter Part -1

************************** 

1.C - WU - Add Two Integers (Format Specifier) (Id-5418);

ANS:

scanf("%d %d",&A,&B); 

**************************

2.C - WU - Product Two Integers (Scanf Args) :

scanf("%d %d",&A,&B); 

************************** 

 3.C - WU - Remainder Two Integers (Printf Args) :

printf("%d",A%B);

************************** 

4.C - WU - Quotient Two Integers (Declaration)

int A,B;

************************** 

5.C - WU - Three Integers - Sum and Product (Printf Args)

printf("%d",(C+A)*B);

**************************

6.C - WU - Print Number (scanf Args)

scanf("%d",&N);

**************************

7.C - WU - Three Integers - Subtract and Multiplies(Declaration)

int A,B,C;

**************************

8.C - WU - Multiply the Number with 2(printf Args)

printf("%d",N*2);

**************************

9.C - WU - Three Integers - Sum and Divides(Format Specifier)

scanf("%d %d %d",&A,&B,&C);

**************************

10.C - WU -Half of the Number (printf Args)

printf("%d",(N/2));

**************************

16.C - WU - Four Integers - Quotient of Sum (Scanf Args)

#include <stdio.h>

int main()

{

 int A, B, C, D;

 printf("%d", (C+A)/(B+D));

}

**********************************************

17.  C - WU - Print Yes - Both Integers are Odd (Condition)

#include<stdio.h>

int main()

{

 int A,B;

 scanf("%d%d",&A,&B);

{

 printf("Yes");

 }

 else

 {

 printf("No");

 }

}

**********************************************************************
18. C - WU - Four Integers - Product of Sum (Scanf Args)

 scanf("%d %d %d %d",&C,&B,&A,&D);


**************************************************************************

19. C - WU - Print Yes - One of Two Integers is Odd

if(A%2!=0 || B%2!=0)

**************************************************************************************************

20.   C - WU - Larger Integer (Condition) 

if(num1>num2)

******************************************************************************************

21.  C - WU - Print Yes - At Least one of the Two Integers is Even

if(A%2==0 || B%2==0)

******************************************************************************************

22.  C - WU - Four Integers - Subtraction of Products (Scanf Args)

 scanf("%d %d %d %d",&C,&A,&D,&B);

*************************************************************************************

23.  C - WC - Print skill or rack (Error Identification)

#include<stdio.h>
int main()
{
 char ch;
 scanf("%c",&ch);
 switch(ch)
 {
 case 's':
 printf("skill");
 break;
 default:
 printf("rack");
 }
 return 0;
}

***********************************************************************

 

24. C - WU - Four Integers - Quotient of Sum (Scanf Args)

scanf("%d %d %d %d",&D,&A,&C,&B);

***************************************************************************

25.  C - WU - Four Integers - Sum of Product (Scanf Args)

 

scanf("%d %d %d %d,&C,&A,&B,&D);


**********************************************************************

26. C - WU - Four Integers - Sum of Product and Quotient (Scanf Args)

scanf("%d %d %d %d,&C,&A,&B,&D);

************************************************

27. C - WU - Four Integers - Subtraction of Quotients (printf Args)

printf("%d",(A/B)-(C/D));

***************************************************

28. C - WU - Print String (Declaration)

char S[100];

**************************************************

29. C - WU - Four Integers - Sum of Remainders (printf Args)

printf("%d",A%D+C%D);

*********************************************

30. C - WU - Print 5 and 3

int i=3;

*******************************************



Post a Comment

Previous Post Next Post