educationalera

  • Increase font size
  • Default font size
  • Decrease font size

C Language

AddThis Social Bookmark Button

1.) What will be printed as the result of the operation below:

void main()

       {
               int const * p=5;

               printf("%d",++(*p));

     }

View Answer

Answer: Compiler error: Cannot modify a constant value.

Explanation: p is a pointer to a "constant integer". But we tried to change the value of the "constant integer".


2.) What will be printed as the result of the operation below:

main()

{

        int a=20,b=35;

        a=b++ + a++;

        b= ++b + ++a;

        printf("%d%d\n",a,b);
}

View Answer

Answer : 5794


3.) A pointer is

A.) A keyword used to create variables

B.) A variable that stores address of an instruction

C.) A variable that stores address of other variable

D.) All of the above

View Answer

Answer: Option C


4.) What will be printed as the result of the operation below:

main()

}

          int i=3;

          switch(i)

       }

default: printf("zero");

     case 1: printf("one");

     break;

     case 2:printf("two");

     break;

     case 3: printf("three");

     break;

    {

{

View Answer

Answer: Option Three


5.) Find result of the operation below:

main()

}

      struct date;

      struct student

}

char name[30];

struct date dob;

}stud;

struct date

}

       int day,month,year;

;{

scanf("%s%d%d%d", stud.rollno, &student.dob.day, &student.dob.month,

&student.dob.year);

{

View Answer

Answer: Compiler Error: Undefined structure date

Explanation:

Only declaration of struct date is available inside the structure definition of ‘student’ but to have a variable of type struct date the definition of the structure is required.


 

 
  • «
  •  Start 
  •  Prev 
  •  1 
  •  2 
  •  3 
  •  4 
  •  Next 
  •  End 
  • »
JPAGE_CURRENT_OF_TOTAL


Oracle Certification

oracle_logo

The Oracle Certification Program is a professional certification program offered by the Oracle Corporation. There are three levels of Oracle Certification in several disciplines: Oracle Certified Associate (OCA), Oracle Certified Professional (OCP), and Oracle Certified Master (OCM).

Java Certification

java_logo

Sun Certified Professional (SCP) is a professional certification program by Sun Microsystems, a subsidiary of Oracle Corporation. There are two levels of java Certification in several disciplines: Sun Certified Java Associate (SCJA), Sun Certified Java Programmer (SCJP), and Sun Certified Java Developer (SCJD)

Red Hat Certification

red_hat_logo

The Red Hat Certification Program is Red Hat's professional certification program for Red Hat and general Linux related skills such as system administration on Red Hat Enterprise Linux Red Hat Certified Technician (RHCT)  and Red Hat Certified Engineer (RHCE)