• 0
Votes
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /var/www/html/cnasolution/application/views/question.php
Line: 191
Function: _error_handler

File: /var/www/html/cnasolution/application/controllers/Questions.php
Line: 419
Function: view

File: /var/www/html/cnasolution/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

What is the point of the second “ ch = getchar(); ”

int main(void) {     char ch;     int len = 0;      printf("Enter a message: ");     ch = getchar();      while (ch != '
')     {          len = len + 1;         ch = getchar();     }     printf("Your message was %d characters long
", len);       return 0;   } 

I understand the first " ch = getchar(); " because that's reading the characters from the printf statement, but I don't understand the purpose of the 2nd " ch = getchar(); " in the while loop.

Download script demo [LINK]
Download script demo [LINK 2] Download script demo [LINK 2]
c