c assign
c assign
Question
2} Which in-built string function can be used for Searching inside a given string?
5} Define Sorting.
7} What will happen if in a C program you assign a value to an array element whose subscript
8} What is the Format specifier used to print a String or Character array in C Printf or Scanf function?
9} An array Index starts with?
12} Write down the return value after the operation of function strcmp("can","cnt").
15}What will be the output of C Statement if we choose the number 66 in the array, int ary[3][2] =
{{11,22},{33,44},{55,66}};
#include <stdio.h>
x=2*x+y;
return x;
int main(){
y=jumble(y,x);
x=jumble(y,x);
return 0;
#include <stdio.h>
int main()
int i,j,m;
i=++a[1];
j=a[1]++;
m=a[i++];
printf("%d %d %d",i,j,m);
return 0;
#include <stdio.h>
int main()
int i=3;
printf("%c", arr[--i]);
return 0;
21} Which keyword is used to transfer control from a function back to the calling function?
#include <stdio.h>
int main()
{
char *ptr;
ptr = mystring;
ptr += 5;
printf("%s",ptr);
return 0;
26} What is the out put of this C program with arrays and pointers? int main()
p = ary;
q = ary+2;
return 0;
#include <stdio.h>
x=2*x+y;
return x;}
int main(){
y=jumble(y,x);
x=jumble(y,x);
printf(“%d ”, x);
return 0; }
30} How can you return more than one value from a function?
#include<stdio.h>
int main()
int i, arr[10];
for(i=0;i<10;i++)
arr[i*2]=1;
for(i=0;i<10;i++)
arr[i*2+1]=-1;
for(i=0;i<10;i++)
printf("\t %d",arr[i]);
return 0;
35} If an array is declared as double arr[50], how many bytes will be allocated to it?
36} If an array is declared as int arr[5][5], how many elements can it store.
#include <stdio.h>
int main()
int i, sum = 0, *b = a + 4;
return 0;
int main(){
printf(“%d\n”, ip[1]);
return 0;
46}What do you mean by compile time initialization? Give suitable example of Compile time
initialization of C Array.
47} Explain the following string handling functions a) strcmp( ) b) getchar() c) strcut()
48} Describe difference between runtime and compile time initialization of array in C program.
49} Write a C program to read and display 5 integer values in 1-D array.
int main()
int i=0;
while(i<3) {
54} Write a C program to count total number of even and odd elements in an
array.
57} Write a C program to count the length of a string without using library function.
61} Write a program to find out the number of occurences of each number.
62} Write a program in C to count total number of alphabets, digits and special characters in a string.
63} Write a program to calculate length of a string without using library function?
64} Write a program to check whether a string is palindrome or not? Do not use any library function.
65} Write a C program to read and display values of an 1-D array using pointer.
66} Write a C program to swap the values of two variables using pointer.
71} Write a C program to perform addition and subtraction of a integer numbers using function.
72} Write a C program to print the address of each element of an 1-D array using pointer.
73} Write a C program using function that computes that compute X^n, where X is any valid number
75} What is function ? Explain the difference between user defined and library functions
78} Write a C-program using function to check whether the given number is prime or not.
79} What is the difference between call by value and call by reference
81} What is pointer ? Explain how the pointer variable declared and initialized?
82} Explain the C Function with no argument and no return value with an example.
83} What are actual parameters and formal parameters? Illustrate with example
86} State the advantages of user defined functions over pre-defined function.