Professional Documents
Culture Documents
int i=10,j=20,k=0,l;
7)l=i&&j||j&&k;
8)l=i||j&&i||k;
(G)ASSIGNMENT OPERATOR
CONTROL STATEMENT
Non-iterative
7. Take input of marks of 5 subjects and calculate the grade of student and if average is
>90 A
>80 B
>70 C
>60 D
>50 E
Iterative
1. Prime Number
3. Factorial
4. Factorial upto N number
6. Armstrong number
13. Palindrome
Unconditional
4. For 1000 rupees how many notes of 10,50,100,500 requires design by using switch
Patterns
***** (2)
* (1) ****
** ***
***
**
****
***** *
*****
* (3) **** (4)
** ***
***
**
****
***** *
***** *
**** **
***
***
****
** *****
*
* (5) ***** (6)
** ****
*** ***
**** **
***** *
A (7) A (8)
A B B C
A B C D E F
A B C D G H I J
A B C K L M
A B N O
A P
FUNCTION
1. Print given number into binary
7. Addition of two array element and keep in third array using function
STRING
1) How to declare, initialise the string.
2) How to scan, print element in the string.
3) How to find length of string.
4) How to copy one string into another string.
5) Find the vowels in an array.
6) Small letter Into capital letter.
7) Convert BANGALORE into BANGALURU.
8) Find how many given character is present in the given string.
9) How to reverse the string.
10) How to concatenate strings.
11) Replace the character in the string.
12) Find the given string is palindrome or not.
13) Convert DEVANSHI into ADEHINSV.
14) Remove consecutive space of given string.
15) Remove the consecutive space but one space should be remain.
16) From WORLD HEALTH ORGANISATION print only WHO.
17) Remove special character in an array.
18) I HAVE MANY BOOK change into (koob ynam evah i).
19) I HAVE MANY BOOK change into (book many have i).
20) Separate integer, character and special character.
POINTERS
1. Initialisation of Pointer : Find out the value for (I, p,*p)
e. int i=10;
int *p;
p=&i;
3. For i=258, find out the value for integer pointer and character pointer.
5. Find out the binary format of int number using integer pointer.
a. *p++
b. ++*p
c. *++p
d. *(p++)
e. (*p)++
2D ARRAY
A. if int b[2][3]= {10,20,30,40,50};
3. printf (“%d\n”,sizeof(b[0][0]));
8. printf (“&b+1=%u\n”,&b+1);
3D ARRAY
A. c [2][2][3]= {10,20,30,40,50,60,70,80,90,100};
ARRAY OF POINTER
A. int i=10, int j=20, k=30;
Int *p[3];
P[0]=&I;
P[1]=&j;
P[2]=&k;
1.Printf(“%d%d%d\n”, *p[0],*p[1],*p[2]);
2.printf(“p=%u\n”,p);
6. printf (“*p[0]=%u\n”,*p[0]);
7. printf (“*(p+1)=%u\n”,*(p+1));
8. printf (“**p[0]=%u\n”,**p[0]);
B. int a [5]={10,20,30,40,50};
1.printf(“*p[0] =%d\n”,*p[0]);
2printf(“p[1][0]=%d\n”, p[1][0]);
3.printf(“p[1][1]=%d\n”, p[1][1]);
POINTER TO AN ARRAY
A. int a [5] = {10,20,30,40,50};
Int *q;
p=a;
q=a;
5.write a program to scan 5 string from a user print in on the screen using 2D array.
DMA
1) WAP FOR ADDITION OF MATRIX ELEMENT USING DMA.
2) WAP FOR MULTIPLICATION OF 2 MATRIX USING DMA.
3) WAP FOR SORTING OF STRING USING DMA.
FILE HANDLING
1. Copy source file content to destination file.
2. Modify the above program in such a way that if destination already exist, interact with
the user for overwrite or not to overwrite and design accordingly
4. W.A.P. to copy source file content in multiple destination file using command line
argument.
5. W.A.P. for find out the size of a file (number of character present)//using command
line
6. W.A.P. for find out how many times a given character present in a file//using
command line
7. W.A.P. to search how many times a given word present in a given file.
8. Modify the above programme in such a way, whenever the character present replace
with another.
10. W.A.P. for maintaining of record of 5 students by using fscanf & fprintf and sort
according to the roll no.
13. Implement your own wc command (no of linr,no, of word, no of newline, size of file
etc)
STRUCTURE
1. Structure declaration, initialisation
2. scan the member of structure
3. W. A. P. to copy the content of one structure into another
4. Array of structure: maintain record of 3 students
5. Sorting according to roll number of above students
6. Nested structure: W. A. P. for maintaining record of employee by their DOB, DOJ, name,
Employee id, age etc
7. Structure pointer: Initialisation of structure using pointer
8. Structure and DMA
A. Dynamic memory allocation with pointer
B. Scanning the dynamic memory with pointer
9. W. A. P. for sorting the record of 3 students by roll no, name, marks; option will be provided by
user
10. Structure bit field: Find the size of structure bit field variable
11. Structure and Function:
A. Passing any structure member to a function
B. Passing any structure to a function
C. Passing any structure to a function using pointer
12. Structure Padding
UNION
1. Address of union variable
2. Number is little or big endian in union
ENUM
1) How to Declare, initialise, scan enum
2) Find out values for enum{red, white, blue, green, black, yellow, orange};
3) Find out values for enum{red=2, white, blue, green, black=1, yellow, orange};
4) Find out values for enum{red, white, blue, green, black=-2, yellow, orange};
5) Find out values for K1=green and K2=orange if
enum K1, K2 {red, white, blue, green, black=-2, yellow, orange};