Programme Code :
Course Code :
| More

Year : Views: Submitted By : On th December,

Do you have solution for this Question. If yes    Send Email when get solution.

Q.

Catch The Solution

By Prashant Thakur


(a) Write a simple program to find the size of different basic data types in C.



#include

#include

void main()

{

int a;

float b;

char c;

double d;

clrscr();



printf("The size of a is %d bytes",sizeof(a));

printf("The size of a is %d bytes",sizeof(b));

printf("The size of a is %d bytes",sizeof(c));

printf("The size of a is %d bytes",sizeof(d));

getch();

}

 



By ekta


#include

#include

#include

void main(){

char str1[20],str2[20],str3[40]="";

int len,i,j;

clrscr();

printf("*****Strings Concatination Function*****\n\n");

printf("Enter string1: ");

scanf("%s",str1);

printf("Enter string2: ");

scanf("%s",str2);



for(i=0,j=0;str1[i]!='\0';i++,j++)

str3[j] = str1[i];



for(i=0;str2[i]!='\0';i++,j++)

str3[j] = str2[i];



str3[j] = '\0';

len = j;



printf("\n\nAfter Concatination : %s",str3);

printf("\n\nLength of concated string is %d",len);

getch()




All form fields are required.

Name
Email
In above form fill your Name and Email Id. We will send an email when we solve it.