-->

college terminal questions

Please click the given  link.
-----------------------------------------------------------------------------
for 11(science+mgmt):

click for main content(folder)

or
1)click for 2072 B.S. questions

2) click for 2073 B.S. questions

3) click for 2074 B.S. questions

4) click for 2075 B.S. questions


--------------------------------------------
for 12(management only):

click for main content(folder)
or
--------------------------------------
1)click for 2072 B.S. questions

2) click for 2073 B.S. questions

3) click for 2074 B.S. questions

4) click for 2075 B.S. questions



program to understand malloc() using struct

//understanding struct pointer
#include <stdio.h>
#include <stdlib.h>
struct reco
{
    int a;
    float b;
    char c;
};
int main()
{
    struct reco *p;//pointer declaration of struct type
    p=(struct reco *) malloc (sizeof(struct reco));//memory allocation
    p->a=10;//value assignment
    p->b=3.14;//value assignment
    p->c='a';//value assignment
    printf("i=%d \nf=%f\nc= %c\n",(*p).a,(*p).b,(*p).c);//value printing
    free(p);
    return 0;
}