<u>Explanation:</u>
ASCII, abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. Basically, ASCII value is the something which computers understand .
C program that asks the user to enter a single character and then outputs the ASCII number of that character :
#include <stdio.h>
#include <string.h>
int main()
{
char Str[10];
int i,length;
printf("Enter the String: ");
scanf("%s", Str);
if(strlen(Str) == 1){
printf(" %c ASCII value is %d",Str[0],Str[0]);
}
else{
printf(" Please enter only single character!! ");
}
return 0;
}
Answer:
C++ code explained below
Explanation:
SOURCE CODE:
*Please follow the comments to better understand the code.
#include <stdio.h>
int numOfBytes(char* string)
{
// initialise the variables
int i=0,size=0;
// while the string reaches to \0, repeat the loop.
while(string[i]!='\0')
{
// add that size
size += sizeof(*string);
// increase the i value.
i++;
}
// add 1 byte for \0
size = size+1;
return size;
}
int main() {
char name[]="Praveen Kumar Reddy";
printf("The size is %d bytes.",numOfBytes(name));
return 0;
}
=============
D)no one
..........................................
Answer:
Ping
Mbps Speed (Download or Upload)
Brainliest Please.
Tell me if im right please!!