Beruflich Dokumente
Kultur Dokumente
2.
5.
double d;
d = *x
return d;
6.
When we define a pointer to pointer, the first pointer is used to store the address of second pointer
so that is double pointer.
7.
The break statement terminates the loop (for, while and do...while loop)
immediately when it is encountered. Its syntax is: break;
The continue statement skips statements after it inside the loop. Its syntax is: continue;
8.
Null character is a character that has all its bits set to 0. A null character, therefore, has a
numeric value of 0, but it has a special meaning when interpreted as text. In C, a null
character is used to mark the end of a character string.
9.
The difference is puts is used to display only strings. However, printf is used to display integer,
float, character, hexa decimal values as well as strings.scanf() is used to read input of any
datatype while gets is used only for string input.
10.
SDLC Phases
Given below are the various phases of SDLC:
Requirement gathering and analysis
Design
Implementation or coding
Testing
Deployment
Maintenance
#1) Requirement Gathering and Analysis
During this phase, all the relevant information is collected from the customer to develop a
product as per their expectation. Any ambiguities must be resolved in this phase only.
Business analyst and Project Manager set up a meeting with the customer to gather all the
information like what the customer wants to build, who will be the end user, what is the
purpose of the product. Before building a product a core understanding or knowledge of the
product is very important.
#2) Design
In this phase, the requirement gathered in the SRS document is used as an input and
software architecture that is used for implementing system development is derived.
#4) Testing
Testing starts once the coding is complete and the modules are released for testing. In this
phase, the developed software is tested thoroughly and any defects found are assigned to
developers to get them fixed.
Retesting, regression testing is done till the point at which the software is as per the
customer’s expectation. Testers refer SRS document to make sure that the software is as
per the customer’s standard.
#5) Deployment
Once the product is tested, it is deployed in the production environment or first UAT (User
Acceptance testing) is done depending on the customer expectation.
In the case of UAT, a replica of the production environment is created and the customer
along with the developers does the testing. If the customer finds the application as
expected, then sign off is provided by the customer to go live.
#6) Maintenance
After the deployment of a product on the production environment, maintenance of the
product i.e. if any issue comes up and needs to be fixed or any enhancement is to be done
is taken care by the developers.
12
#include<stdio.h>
#include<conio.h>
void main()
{
int a[50];
int n,i,small,s_small;
clrscr();
printf("\n Enter number of elements: ");
scanf("%d",&n);
small=s_small=a[0];
for(i=1;i<n;i++)
{
if(small>a[i])
{
s_small=small;
small=a[i];
}
else if(s_small>a[i] && a[i]!=small)
{
s_small=a[i];
}
}
printf("\n The Second Smallest Element in the given Array: %d", s_small);
getch();
}
13
/* C program to find all prime numbers from the inputted array */
#include<stdio.h>
#include<conio.h>
void main()
{
int ar[100],i,n,j,counter;
14.
#include <stdio.h>
#include <string.h>
int main()
{
char Str1[100];
int i;
printf("\n The Given String after Toggling Case of all Characters = %s", Str1);
return 0;
}
15.
#include <stdio.h>
#include <string.h>
int main()
{
char a[100], b[100];
return 0;
}
16.
#include <stdio.h>
int main()
{
int m, n, p, q, c, d, k, sum = 0;
int first[10][10], second[10][10], multiply[10][10];
if (n != p)
printf("The matrices can't be multiplied with each other.\n");
else
{
printf("Enter elements of second matrix\n");
multiply[c][d] = sum;
sum = 0;
}
}
printf("\n");
}
}
return 0;
}
17.
The call by reference method of passing arguments to a function copies the address of an
argument into the formal parameter. Inside the function, the address is used to access the
actual argument used in the call. It means the changes made to the parameter affect the
passed argument. To pass a value by reference, argument pointers are passed to the
functions just like any other value.
#include <stdio.h>
#include <conio.h>
int find_largest(int [],int);
int main()
{
int arr[30],size,largest,i;
printf("Enter the size of the array maximum up to 30: ");
scanf("%d",&size);
printf("Enter the %d integer numbers: ",size);
for(i=0;i<size;i++)
scanf("%d",&arr[i]);
largest = find_largest(arr,size);
printf("\nThe largest element is: %d\n",largest);
return 0;
getch();
}
int find_largest(int arr1[],int size1)
{
int temp_larg,i;
temp_larg=arr1[0];
for(i=1;i<size1;i++)
{
if(arr1[i]>temp_larg)
temp_larg=arr1[i];
}
return(temp_larg);
}