1ST SEM C LANGUAGE BY GOD




USE AT YOUR OWN RISK 
{YEH MEINE KHUD SE BANAYE HAI ,,
JO AA SAKTE HAI ,, MOST PROBABLY }



FOR : 1st sem exam

PROBABLY IN 10 MARKS

#$# > Different types of storage classes.??< last mein hai >



**What are tokens in C language?  u-1

*what is flowchart ? exapain them with symbols?u-1

*type conversion and their types?u-1


*four categories of user defined funcation? u-2

*Explain the functions of.String library ??

*two mechanism of function call ?

  • call by value
  • call by address 

*describe file handling with function 


*Define continue break and go to statements.


<< INCOMPLETE >>



WAP - WRITE A PROGRAM  //FEAT.CARDI B, DOJO CAT (•_•)


in assignment -->> 1.2.4.18

EK STRUCTURE OR UNION KA PROGRAM DEKH LENA


Write a program to check a number is even or odd ??

Write a program to check The enter number is prime or not ?

calculate simple interest rate ?






file handling ..> click

structures ..> click


call by value and reference 


20. define and write a program to swap two numbers using call
by value and call by address.

defination = Call by value in C
    In call by value method,the value of the actual
parameters is copied into the formal parameters.
In other words,
    we can say that the value of the variable is
used in the function call in the call by value method.

    In call by value method, we can not modify the
value of the actual parameter by the formal parameter.


code:
#include <stdio.h>
                                                                                                                                void
                                                                                                                                swap(int, int);
void main()
{
    int n, m;
    printf("Enter the two numbers to be swapped\n");
    scanf("%d%d", &n, &m);
    printf("\nBefore Swap n=%d m=%d", n, m);
    swap(n, m);
}
void swap(int n, int m)
{
    int temp;
    temp = n;
    n = m;
    m = temp;
    printf("\nAfter Swap n=%d m=%d", n, m);
}

// ref..
defination = Call by reference in C In call by reference,
    the address of the variable is passed into the function
call as the actual parameter.The value of the actual parameters
can be modified by changing the formal parameters since the address
of the actual parameters is passed.

code:

#include <stdio.h>
    void
    swap1(int *n, int *m);

int main()
{
    int n, m;
    printf("Enter two numbers: ");
    scanf("%d%d", &n, &m);
    printf("\nBefore swap of n = %d m = %d \n", n, m);
    swap1(&n, &m);
    return 0;
}

void swap1(int *n, int *m)
{
    int temp;
    temp = *n;
    *n = *m;
    *m = temp;
    printf("\nAfter Swap of n = %d m = %d", *n, *m);
}






OLD QUESTIONS 


mid sem 🎆BY CHETAN YADAV {GOD} ^_^


Different types of software.??

Explain all three data types that is primitive, derived and user defined.?What is the difference???

Explain three types of loop.??

Categories of user defined functions.Return type argument.List.??

What is the structure??Describe how to declare initialize it.With.Example.


SHORT NOTE ON 

A.What is  Array??

B.What is algorithm???

C.How many space Character. integer and float take in memory ??

D.What is the use of pointers ??


Post a Comment

0 Comments